Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az containerapp up expects container registry to be in the same subscription #25092

Closed
Thorstensen opened this issue Jan 10, 2023 · 8 comments
Closed
Assignees
Labels
Auto-Assign Auto assign by bot Container Instances az container ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Installation needs-author-feedback More information is needed from author to address the issue.
Milestone

Comments

@Thorstensen
Copy link

Related command

az containerapp up --name containerAppName --registry-server myRegistry.azurecr.io \
                   --registry-user myUser --registry-password myPassword \
                   --image myRegistry.azurecr.io/myApp/backend:$(Build.BuildId)

Describe the bug
Running the command above expects that ACR is in the current subscription, even though the FQDN to ACR is provided with correct credentials. In our current set up, we have one Azure Container Registry in Subscription Production, but we want to create resources in Subscription Test

To Reproduce

  1. Make sure that you have two subscriptions in Azure. One where the ACR is located, and one subscription where the ContainerApp should be created.
  2. Install the Azure CLI and containerapp extension by running az extension add --name containerapp --upgrade
  3. Open you terminal of choice, and run the command above reflecting your environment.

Expected behavior
The ContainerApp will be created in Subscription Test based on the specified image from ACR in Subscription Production

Environment summary

azure-cli: 2.43.0
containerapp 0.3.20

Additional context

  • According to this issue the flag --subscription can be set, but this will also create the resources in this subscription.
  • According to this issue it works when the image is located in DockerHub - I can not see any differences between these to image repositories.
@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Container Instances az container CXP Attention This issue is handled by CXP team. Installation labels Jan 10, 2023
@ghost ghost assigned jiasli Jan 10, 2023
@ghost ghost added this to the Backlog milestone Jan 10, 2023
@ghost ghost added the ContainerApp label Jan 10, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 10, 2023

route to CXP team

@SaurabhSharma-MSFT SaurabhSharma-MSFT self-assigned this Jan 11, 2023
@Thorstensen
Copy link
Author

Thorstensen commented Jan 16, 2023

To elaborate: Running az containerapp up specifying --registry-server --registry-user and --registry-password result in ERROR: The resource with name 'xyz' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription 'mySubscription (Some-guid-identifying-subscription)'. These two resources ARE in two different subscriptions, but why does that matter when all the information above is supplied?

@SaurabhSharma-MSFT
Copy link
Member

@Thorstensen Can you please look into this GitHub issue. Also, refer to the below documentation if this helps to achieve what you are looking for.

@SaurabhSharma-MSFT SaurabhSharma-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Feb 1, 2023
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Feb 8, 2023
@ghost
Copy link

ghost commented Feb 8, 2023

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@phoenixx
Copy link

I am also seeing this exact issue. A container image from a registry in Subscription A is not accessible when attempting to use az containerapp up in Subscription B - I get the exact same error as above: "ERROR: The resource with name 'xyz' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription 'mySubscription (Some-guid-identifying-subscription)'."

I have been able to use Terraform (with the azure/azapi provider) to initially deploy the Azure Container App successfully and then az containerapp update to deploy new image versions, but this is far from ideal.

Is there any further information I can provide to help get to a solution?

@ghost ghost removed the no-recent-activity There has been no recent activity on this issue. label Feb 16, 2023
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Feb 23, 2023
@ghost
Copy link

ghost commented Feb 23, 2023

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Mar 9, 2023
@giovannifl
Copy link

giovannifl commented Sep 13, 2023

Please reopen ths ticket again because it has not been fixed and it is still relevant

@microsoft-github-policy-service microsoft-github-policy-service bot removed the no-recent-activity There has been no recent activity on this issue. label Sep 13, 2023
@glennsdavis
Copy link

This was working for me but is no longer not working.

1.) Using "az containerapp create" command, create container app in Subscription A from image in Azure Container Register in Subscription B.

2.) Using "az containerapp up" command, update same container app in Subscription A from image in Azure Container Register in Subscription B.

#2 now returns error "type 'Microsoft.ContainerRegistry/registries' could not be found in subscription".

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Container Instances az container ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Installation needs-author-feedback More information is needed from author to address the issue.
Projects
None yet
Development

No branches or pull requests

7 participants