How to update ACR password in the Azure container app secrets without using UI?

244 views Asked by At

As we have more than 50 container apps that require ACR password updates, doing it through UI is a very long task.

I tried to create a Makefile which uses the az cli tool to get the secret name and update with new password. Note, the secret name was auto-created when container app is created.

While running the below command,

az containerapp secret set -n MyApp -g MyRG --secrets reg-pswd-abcd1234-ab12=MySecretToken where reg-pswd-abcd1234-ab12 is the name of the secret automatically generated upon the app's creation

getting the following error:

Secret names cannot be longer than 20. Please shorten reg-pswd-abcd1234-ab12

Question:

  1. Is there any other workaround to update this secret value?

or

  1. Create a new secret value and replace the reference of the old secret name with a newer one?
0

There are 0 answers