Skip to content

az containerapp create --yaml: issue with userAssignedIdentities #27272

@Trueber

Description

@Trueber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions