hashicorp / hashicorp/packer-plugin-azure
Managed Identity authentication when using Azure Gov cloud
- Dominant language
- Go
- Stars
- 63
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @jorluiseptor in https://github.com/hashicorp/packer/issues/11804 and has been migrated to this repository. The original issue description is below._
---
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
#### Overview of the Issue
Can anyone confirm that we can authenticate using managed identity when running Packer on the Azure Gov Cloud? I'm asking because I'm getting the error below. While searching the web, I ran [into a similar question ](https://github.com/hashicorp/packer/issues/5034), but @boumenot said that managed identity was only supported in the commercial cloud. However, that question was related to AzureGerman cloud, not the US Gov cloud. I didn't see that in the documentation. Can you confirm? Maybe that's why I'm getting the error below.
```
Debug mode enabled. Builds will not be parallelized.
azure-arm: output will be in this color.
==> azure-arm: Running builder ...
==> azure-arm: Getting tokens using device flow
==> azure-arm: Getting token for https://management.usgovcloudapi.net
Build 'azure-arm' errored after 214 milliseconds 478 microseconds: packer-azure application not set up for Azure environment "AzureUSGovernment"
==> Wait completed after 214 milliseconds 478 microseconds
==> Some builds didn't complete successfully and had errors:
--> azure-arm: packer-azure application not set up for Azure environment "AzureUSGovernment"
==> Builds finished but no artifacts were created.
```
#### Reproduction Steps
In the AzureUSGovernment environment, try to build an image.
### Packer version
From `1.8.0`
Contributor guide
Research direction
Start by reproducing the image build in the AzureUSGovernment environment and review the reported device-flow error for the AzureUSGovernment environment. Done means Packer can authenticate with managed identity in Azure Gov Cloud and proceed with the image build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100