Describe the bug
az containerapp create --yaml does mess up the resource group and user assigned identities if they contain - or _.
The id
/subscriptions/my-subscription-id/resourcegroups/my_resource_group_dev/providers/Microsoft.Managedidentity/Userassignedidentities/my-user-assigned-identity
somehow gets changed to
/subscriptions/my-subscription-id/resourcegroups/myResourceGroupDev/providers/Microsoft.Managedidentity/Userassignedidentities/My-User-Assigned-Identity
on is then now found
Related command
az containerapp create
Errors
ERROR: (FailedIdentityOperation) Identity operation for resource '/subscriptions/my-subscription-id/resourceGroups/my_resource_group/providers/Microsoft.App/containerApps/my-container-app' failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response: '{"error":{"code":"BadRequest","message":"Resource '/subscriptions/my-subscription-id/resourcegroups/myResourceGroup/providers/Microsoft.Managedidentity/Userassignedidentities/My-User-Assigned-Identity' was not found."}}'.'.
Issue script & Debug output
az containerapp create -g my_resource_group -n my-container-app --yaml template.json
with template.json containing:
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/my-subscription-id/resourcegroups/my_resource_group /providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-user-assigned-identity": {}
}
},
debug.log
Expected behavior
The container app is created with user assigned identity
Environment Summary
azure-cli 2.51.0
core 2.51.0
telemetry 1.1.0
Extensions:
containerapp 0.3.37
Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2
Can be reproduces on WSL/Ubuntu and container image mcr.microsoft.com/azure-cli
Additional context
No response
Describe the bug
az containerapp create --yamldoes mess up the resource group and user assigned identities if they contain-or_.The id
/subscriptions/my-subscription-id/resourcegroups/my_resource_group_dev/providers/Microsoft.Managedidentity/Userassignedidentities/my-user-assigned-identitysomehow gets changed to
/subscriptions/my-subscription-id/resourcegroups/myResourceGroupDev/providers/Microsoft.Managedidentity/Userassignedidentities/My-User-Assigned-Identityon is then now found
Related command
az containerapp createErrors
ERROR: (FailedIdentityOperation) Identity operation for resource
'/subscriptions/my-subscription-id/resourceGroups/my_resource_group/providers/Microsoft.App/containerApps/my-container-app'failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response:'{"error":{"code":"BadRequest","message":"Resource '/subscriptions/my-subscription-id/resourcegroups/myResourceGroup/providers/Microsoft.Managedidentity/Userassignedidentities/My-User-Assigned-Identity' was not found."}}'.'.Issue script & Debug output
az containerapp create -g my_resource_group -n my-container-app --yaml template.jsonwith template.json containing:
debug.log
Expected behavior
The container app is created with user assigned identity
Environment Summary
azure-cli 2.51.0core 2.51.0telemetry 1.1.0Extensions:
containerapp 0.3.37Dependencies:
msal 1.24.0b1azure-mgmt-resource 23.1.0b2Can be reproduces on WSL/Ubuntu and container image
mcr.microsoft.com/azure-cliAdditional context
No response