Im creating an `AzureNative.ContainerRegistry.Regi...
# azure
i
Im creating an
AzureNative.ContainerRegistry.Registry
and publishing a container image in there. When I try and reference the image on the
Template
object via`AzureNative.App.ContainerApp` , it’s failing with the error:
Copy code
UNAUTHORIZED: authentication required
Is there a way to provide Pulumi with the credentials for the registry? Maybe Im missing something in the docs
service principal running pulumi has
Acrpull
role on the container registry
m
You should create a managed identity with Pull rights
And add it to the ContainerApp
i
ill try that out and report back - thanks!
Same deal: Created Registry Created User Assigned Identity Assigned UserAssignedIdentity the acrpull role on registry Assigned UserAssignedIdentity to ContainerApp still erroring 😕
m
So the ContainerApp cant pull the image from the ACR? Just to understand
You can push Images to ACR
i
ive got the image in ACR … trying to write pulumi to stand up a AzureNative.App.ContainerApp with the image in the configuration … but when Pulumi is spinning up the container app, that’s where the error is
m
Do you pass the identity id to the Container App Private Registry field too?
i
aha, i didn’t even see that config - will try that now. thank you! 🙏
Other then that the scope of the role assignment is the registry.id
But this are things you should verify via the Portal UI (guilty of using the UI sometimes 😅 )
i
that’s usually my route … this type of resource is new for me though haha
m
And Important: The Registry should not be build with Admin mode
So
AdminUserEnabled
should be false
i
brilliant
m
otherwhise you could use the username / password and pass it to the https://www.pulumi.com/registry/packages/azure-native/api-docs/app/containerapp/#registrycredentials
i
going to try the user managed identity route and see how it goes
m
Yes, I prefer this too! Your Sec department will love you for this 😄
i
yea, passwords are the devil
I am security haha
m
😄