microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
355 stars 27 forks source link

Secrets using key-vault is broken: performing CreateOrUpdate: unexpected │ status 400 (400 Bad Request) with error #1159

Closed davidkarlsen closed 3 weeks ago

davidkarlsen commented 1 month ago

Please provide us with the following information:

This issue is a: (mark with an x)

Issue description

Accessing secrets backed with keyvault fails with:

│ updating Container App (Subscription:
│ "xxxx"
│ Resource Group Name: "sre-bs-test-nore-rg"
│ Container App Name: "backstage"): performing CreateOrUpdate: unexpected
│ status 400 (400 Bad Request) with error:
│ InvalidParameterValueInContainerTemplate: The following field(s) are either
│ invalid or missing. Field 'configuration.secrets' is invalid with details:
│ 'Invalid value: "postgres-password": Unable to get value using Managed
│ identity
│ /subscriptions/xxxx/resourceGroups/sre-bs-test-nore-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sre-bs-test-nore-uai
│ for secret postgres-password. Error: unable to fetch secret
│ 'postgres-password' using Managed identity
│ '/subscriptions/xxxx/resourceGroups/sre-bs-test-nore-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sre-bs-test-nore-uai'';.
╵

some facts:

Steps to reproduce

  1. create according to bug
  2. see it fail

Expected behavior [What you expected to happen.] should fetch secret

Actual behavior [What actually happened.] See description

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

fails using portal or terraform

davidkarlsen commented 1 month ago

Are there any grown-ups at home here at all?

howang-ms commented 1 month ago

Sorry for the delay. We have investigated this issue, and it is related to validate code cannot process the secret with large expiration date. We will fix the issue ASAP. In the meantime, you can choose a nearer expiration date for your secret as a workaround.

anthonychu commented 3 weeks ago

Fix has been deployed.