Open joshfreitas1984 opened 1 year ago
Did you ever find a work around for this?
@joshfreitas1984 @StandBackBurrito Hey folks, apologies for the delayed response -- from previous testing, the Azure CLI commands we're using under-the-hood to deploy the Container App don't currently support providing an ACR instance from a subscription outside of the one that your current subscription has context to. However, in the Azure Portal, you're able to define an "external registry" to use that can be this separate ACR instance that you want to use. We're working with the CLI team to enable this functionality in the corresponding commands so that we can integrate them with our task, and I'll keep you all posted on any updates we may have.
I had to replace this task with the az containerapp create command from AZ CLI. The up command cannot pull the Docker image from another Azure Container Registry (ACR) in a different subscription, even though Azure Container Apps (CA) has acrPull permission.
You need give the permission (acrPull) before.
- task: AzureCLI@2
displayName: create container app
inputs:
azureSubscription: my_connection
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
#!/bin/bash
az config set extension.use_dynamic_install=yes_without_prompt
az containerapp create -n container-name -g resource-group-name \
--image myacr.azurecr.io/my-image:my-tag \
--ingress external --target-port 3000 --environment ca-environment \
--registry-server myacr.azurecr.io --registry-username acr-username --registry-password acr-password
Hi,
We have an ACR in a totally different subscription to the ACA environment. For example
Subscription: Shared Services RG: rg-sharedservices ACR: acrsharedservices.azurecr.io
Subscription: MyApplication RG: rg-myapp Env: aca-myenv-myapp ImageToDeply: acrsharedservices.azurecr.io/mycompany.myapp:1.0
This is because a couple of reasons:
Here's the various combos we've tried: