Microsoft Azure Developer Associate AZ-204 Practice Question
You have a private Azure Container Registry named contosoacr.azurecr.io that stores an image called api:latest. You must deploy the image to Azure Container Instances (ACI) from an Azure CLI script that runs inside an Azure Automation runbook. The deployment must avoid hard-coded registry credentials and grant only the permissions required for pulling images. What should you do first?
Enable anonymous pull access on contosoacr.azurecr.io.
Enable the admin user on contosoacr.azurecr.io and pass its credentials to az container create.
Create a user-assigned managed identity and grant it the AcrPull role on contosoacr.azurecr.io.
Create an Azure AD service principal with the Contributor role on the subscription and store its credentials as runbook variables.
ACI can authenticate to a private Azure Container Registry by using a managed identity that is assigned to the container group. Granting that identity the built-in AcrPull role on the registry allows the container group to pull images without exposing passwords while restricting permissions to read-only access. Enabling the registry's admin user or creating a service principal requires storing secrets, and assigning Contributor exceeds the least-privilege requirement. Enabling anonymous pull would expose the image publicly and does not meet the requirement for a private registry.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a managed identity in Azure?
Open an interactive chat with Bash
What is the AcrPull role in Azure?
Open an interactive chat with Bash
How does Azure Container Instances authenticate to Azure Container Registry?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Develop Azure compute solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .