Question

Difficulty: EasyDeploy and Configure Azure Container Apps

You have a private Azure Container Registry named registry1 and an Azure Container App named app1. You need to configure app1 to pull images from registry1 using a system-assigned managed identity. The configuration must follow the principle of least privilege. Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

  1. 1Enable the system-assigned managed identity on the container app.
  2. 2Assign the AcrPull role to the container app's system-assigned managed identity on the Azure Container Registry.
  3. 3Configure the container app's registry settings to use the system-assigned managed identity.

Answer

To configure the container app, first enable the system-assigned managed identity on the container app, then assign the AcrPull role to the container app's system-assigned managed identity on the Azure Container Registry, and finally configure the container app's registry credentials to use the system-assigned managed identity.
To allow a container app to pull images from a private Azure Container Registry using a system-assigned identity, you must first enable the system-assigned identity on the container app resource so that Microsoft Entra ID registers it. Next, you assign the AcrPull role to this identity at the registry's scope to authorize access. Finally, you update the container app's registry configuration to use the system-assigned identity for authentication.

Step-by-Step Solution

1
Enable the system-assigned managed identity on the container app.
An identity principal is created in Microsoft Entra ID for the container app.
You must create the system identity before you can grant it permissions on other resources.
2
Assign the AcrPull role to the container app's system-assigned managed identity on the Azure Container Registry.
The identity principal is granted read-only pull permissions to the registry.
This grants the minimum access permissions necessary to retrieve container images from the registry.
3
Configure the container app's registry settings to use the system-assigned managed identity.
The container app uses its system-assigned identity to authenticate against the registry URL.
The container app must be explicitly configured to authenticate via the system-assigned identity when referencing the registry.

Key Concept

Configuring private container registry access for Azure Container Apps using a system-assigned managed identity.
Rate this question