Skip to content
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

azure_rm_virtualmachine_info - need Object ID - Type SystemAssigned #1671

Closed
pc-dok opened this issue Aug 12, 2024 · 2 comments · Fixed by #1674
Closed

azure_rm_virtualmachine_info - need Object ID - Type SystemAssigned #1671

pc-dok opened this issue Aug 12, 2024 · 2 comments · Fixed by #1674
Labels
enhancement New feature or request has_pr PR fixes have been made medium_priority Medium priority

Comments

@pc-dok
Copy link

pc-dok commented Aug 12, 2024

Hi all

I can not retrieve from a Azure Virtual Machine the azure_rm_virtualmachine module - vm identity type - when i try to find out this information with the azure_rm_virtualmachine_info module. i am not sure how to find out this ID in general. i setup it in the vm module but i am not able to retrieve this id in any why in a ansible playbook. can you add the vm_identity also into the vm info module? is sometimes needed when you try to get certificates from a azure key vault etc...

regards
franco

@Fred-sun
Copy link
Collaborator

@pc-dok Do you mean to get identity information in azure_rm_virtualmachine_info.py? Like the following?

 "idenity": {
                    "principal_id": "xxxxxxxxxxxxx",
                    "tenant_id": "xxxxxxxxxxxxxxxx",
                    "type": "SystemAssigned, UserAssigned",
                    "user_assigned_identities": {
                        "/subscriptions/xxxxxxxxxxxxxx/resourceGroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test": {
                            "client_id": "xxxxxxxxxx",
                            "principal_id": "xxxxxxxxxxxxxx"
                        }
                    }
                }

@Fred-sun Fred-sun added enhancement New feature or request has_pr PR fixes have been made medium_priority Medium priority labels Aug 14, 2024
@pc-dok
Copy link
Author

pc-dok commented Aug 14, 2024

yes exactly this is what i need, the principal id, to assign with this ID later a role assignment for the keyvault. is that possible for the info module?

regards
franco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants