Azure / Ansible

Ansible Solution Template on Azure
MIT License
7 stars 10 forks source link

Add identity back to Azure VMSS scale set module "azure_rm_virtualmachinescaleset" #9

Open shannawaz opened 5 years ago

shannawaz commented 5 years ago

Ansible errors out if the resource id for UserAssigned MSI is returned in following pattern:

"/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/"

Instead the code executes successfully if UserAssigned MSI is returned in following pattern. Notice prefix and suffix added. {"/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/":{}}

Identity option was tested using azure_rm_resource as it is not supported with azure_rm_virtualmachinescaleset. I see a Github issue where the identity feature was removed. https://github.com/kubernetes/autoscaler/pull/1617.

See attached code that returns UserAssignedIdentity in the format it will succeed. I will also open feedback with Microsoft to update their documentation https://docs.microsoft.com/en-us/rest/api/compute/virtualmachinescalesets/createorupdate#resourceidentitytype

Identity.txt