Skip to content

fix: Use "virtual_machine_id" for instance identity with Azure #3355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

kylecarbs
Copy link
Member

This was using the wrong property, causing automatic auth to break.

Fixes #3315.

@kylecarbs kylecarbs requested a review from spikecurtis August 2, 2022 13:46
@kylecarbs kylecarbs self-assigned this Aug 2, 2022
This was using the wrong property, causing automatic auth to break.
"azurerm_linux_virtual_machine": "id",
"azurerm_windows_virtual_machine": "id",
"azurerm_linux_virtual_machine": "virtual_machine_id",
"azurerm_windows_virtual_machine": "virtual_machine_id",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually using azurerm_virtual_machine in the example template because azurerm_linux_virtual_machine doesn't support attaching the data disk before booting, meaning I can't format it in cloud-init

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I'll add that as a resource as well.

Copy link
Member Author

@kylecarbs kylecarbs Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spike discovered that the deprecated azurerm_virtual_machine resource exposes the machine ID.

@kylecarbs kylecarbs merged commit 69664ed into main Aug 3, 2022
@kylecarbs kylecarbs deleted the azurevmid branch August 3, 2022 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure-instance-identity authentication uses different instance_id than provisioner
2 participants