You are configuring a multi-container group in Azure Container Instances (ACI) using an Azure Resource Manager (ARM) template. An application container within the group must retrieve database credentials from Azure Key Vault at runtime. You configure the container group with a system-assigned managed identity. The deployment completes successfully, but the application container fails to start. Reviewing the container logs reveals an HTTP 403 (Forbidden) error when the application attempts to fetch the credentials from the Key Vault. Which action should you take to resolve this error?
- Grant the system-assigned managed identity's principal ID the GET permission on secrets using a Key Vault access policy or Azure RBAC role assignment.Cevap
- BModify the template to use a user-assigned managed identity, as ACI does not support system-assigned managed identities for accessing Azure resources at runtime.
- CConfigure the credentials under the imageRegistryCredentials property of the container group in the ARM template.
- DDefine the environment variables in the template using the @Microsoft.KeyVault syntax to automatically resolve the secrets.
Cevap
Grant the system-assigned managed identity's principal ID the GET permission on secrets using a Key Vault access policy or Azure RBAC role assignment.
The correct action is to grant the system-assigned managed identity's principal ID the GET permission on secrets in the Key Vault. A system-assigned managed identity is automatically created for the container group when deployed, but it requires explicit permissions (such as a Key Vault access policy or an Azure RBAC role like Key Vault Secrets User) to access resources like secrets.
Adım Adım Çözüm
Anahtar Kavram
Configuring runtime authorization for ACI container groups using system-assigned managed identities and Key Vault access policies.