Question

Difficulty: MediumDeploy and Configure Azure Container Apps

An Azure Resource Manager configuration is being designed to host an API container image stored in a private Azure Container Registry named `acrcat.azurecr.io`. To comply with security guidelines, a dedicated user-assigned managed identity named `acr-reader-identity` has been assigned to the Azure Container App. To successfully pull the container image, which Bicep block must be defined under the `properties.configuration` section of the Container App resource?

  1. A
    registries: [
    {
    server: 'acrcat.azurecr.io'
    }
    ]
  2. registries: [
    {
    server: 'acrcat.azurecr.io'
    identity: acrReaderIdentity.id
    }
    ]
    Answer
  3. C
    registries: [
    {
    server: 'acrcat.azurecr.io'
    identity: 'system'
    }
    ]
  4. D
    registryCredentials: [
    {
    server: 'acrcat.azurecr.io'
    identityId: acrReaderIdentity.id
    }
    ]

Answer

The Bicep configuration block that defines a list of registries containing the registry server name and the resource ID of the user-assigned managed identity as the value for the identity property.
The configuration block specifying registries with the correct server property and the user-assigned managed identity resource ID is correct. This instructs Azure Container Apps to use the specified user-assigned managed identity to authenticate and pull the image from the private registry.

Step-by-Step Solution

1
Identify the identity type used by the Container App for authentication.
A user-assigned managed identity is configured and assigned the AcrPull role.
Determines how to reference credentials in the registry configuration.
2
Examine the Bicep template schema for container registries.
The registries property requires a 'server' string and an 'identity' string containing the resource ID of the user-assigned identity.
Ensures template syntax compliance with Azure Resource Manager specifications.
3
Associate the user-assigned identity ID with the private registry server in the Bicep template.
The container app is successfully deployed and pulls the image securely from the private Azure Container Registry.
Enables secure, passwordless authentication for container deployment.

Key Concept

Azure Container Apps Private Registry Authentication via Managed Identities
Rate this question