Azure / Azure/bicep

Overriding ARM and AAD endpoints for AzureUSGovernment cloud breaks publish

Open
#9,857 0 comments 0 reactions 0 assignees View on GitHub
bug Quality Sprint
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

We have built-in ARM and AAD endpoints for AzureCloud, AzureChinaCloud, and AzureUSGovernment. However, specifying them like this should work correcly as well:
image

However, the above configuration breaks `bicep publish` and causes the following error:
image

The workaround is to remove the endpoints and just specify the profile like this:
```json
{
"cloud": {
"currentProfile": "AzureUSGovernment",
"credentialPrecedence": [
"AzureCLI"
]
}
}
```

However, this should have worked correctly regardless. Additionally, the bug leads me to believe that this functionality may be broken in AGC.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `bicep publish` with the AzureUSGovernment profile and explicitly overridden ARM and AAD endpoints, then compare it with the documented workaround that omits those endpoints. Trace how the cloud configuration is consumed during publishing and verify that endpoint overrides work for AzureUSGovernment without regressing the other built-in profiles or AGC.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.