Azure / Azure/bicep

AccessToContainerRegistryDenied

Open
#5,202 2 comments 1 reaction 0 assignees View on GitHub
provider bug revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 4h
Merged PRs (30d)
81

Description

Not really a bug report, rather a question for an issue I can't find any info on and can't seem to get passed.

I have a template that deploys an App Service for containers (Linux), that should pull the container image from a private repository.
When I execute az deployment what-if I get the following error:

````
{"error":{"code":"InvalidTemplateDeployment","message":"The template deployment 'main' is not valid according to the validation procedure. The tracking id is '7077a234-ddd0-4ecd-91b5-c7826372338e'. See inner errors for details.","details":[{"code":"ValidationForResourceFailed","message":"Validation failed for a resource. Check 'Error.Details[0]' for more information.","details":[{"code":"AccessToContainerRegistryDenied","message":"Access is denied."}]}]}}
````

In the appsettings of the App Service I specified the necessary credentials: DOCKER_REGISTRY_SERVER_URL, DOCKER_REGISTRY_SERVER_PASSWORD, DOCKER_REGISTRY_SERVER_USERNAME.

Through the portal the App Service deploys correctly.

I tried googling the error message in order to get more information, but apparently I'm the only one running into this as only 1 search result came up, that didn't help a lot.

Can this check be somehow disabled? Worst thing that could happen is that the app doesn't start because the container image couldn't be downloaded, but at least the infrastructure is being created.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Azure Bicep deployment with the App Service for Containers template, private image repository, and the listed DOCKER_REGISTRY_SERVER settings, then compare it with the portal deployment. Review the AccessToContainerRegistryDenied validation path and determine whether the check can be disabled; done means documenting the supported behavior or a confirmed configuration change.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.