Open
Description
The gallery image name comes in the form "GALLERY_NAME/IMAGE_NAME", and the resourceId is not being resolved correctly before being sent to the server. See example failure below:
Get-AzureRmRoleAssignment -ResourceType Microsoft.Compute/galleries/images -ResourceGroupName RG-NAME -ResourceName GALLERY_NAME/IMAGE_NAME
Get-AzureRmRoleAssignment : Scope '/subscriptions/SUBSCRIPTION-GUID/resourceGroups/RG-NAME/providers/Microsoft.Compute/images/GALLERY_NAME/IMAGE_NAME' should have even number of parts.
The name comes from:
(Get-AzureRmResource -ResourceGroupName RG-NAME -ResourceType Microsoft.Compute/galleries/images).Name
If I use just the image name I'm given the error:
Get-AzureRmRoleAssignment : The Resource 'Microsoft.Compute/images/IMAGE_NAME' under resource group 'RG-NAME' was not found.