Hello everyone, I am building a container app in A...
# general
c
Hello everyone, I am building a container app in Azure and is getting a blocker coming from a PasswordSecretRef validity. Has anyone experienced this before?
Copy code
Diagnostics:
  azure-native:app:ContainerApp (xxx-container-app):
    error: Code="InvalidParameterValueInContainerTemplate" Message="The following field(s) are either invalid or missing. Field 'configuration.Registries.askinfosecprod.azurecr.io.PasswordSecretRef' is invalid with details: 'Invalid value: \"[secret]\": secret reference does not exist';."
I’ve already given the requirement what it needs and it seems to be not accepting that value, any clues? Appreciate it guys 🙂
a
Secrets have to be defined in
ContainerApp.onfiguration.secrets
• name (secret-ref) • value Then you consume those secrets by referencing their name. Seems like you're trying to use the password directly in
RegistryCredentials.PasswordSecretRef
instead of creating a secret and referencing the name there...
c
Thank you for the reply Mr. Nielsen. I shall try to use this in my code. I tried referencing the secret before but not like this. Will update you on results 🙂 .
May I also ask on how to build on this? I am currently using TypeScript with my pulumi code and I am a bit lost with this. Much appreciated 🙂
a
Have a look at azure-ts-containerapps from the Pulumi example repo – It also demonstrates how to populate the registry password using outputs of
containerregistry.listRegistryCredentialsOutput
if you have the registry within the same stack. https://github.com/pulumi/examples/blob/master/azure-ts-containerapps/index.ts#L71-L79
c
Thank you so much!