Soru

Zorluk: KolayDeploy and Configure Azure Container Apps

An administrator is deploying an Azure Container App named inventory-service. The application needs to securely retrieve configuration settings from an Azure Key Vault. To minimize management overhead, the administrator requires that the identity used by the application is automatically deleted if the container app itself is deleted. Which identity type should the administrator use, and which Azure CLI command will enable this identity on the container app?

  1. System-assigned managed identity; run: az containerapp identity assign --name inventory-service --resource-group my-rg --system-assignedCevap
  2. B
    User-assigned managed identity; run: az containerapp identity assign --name inventory-service --resource-group my-rg --user-assigned my-identity-resource-id
  3. C
    System-assigned managed identity; run: az containerapp registry set --name inventory-service --resource-group my-rg --server myregistry.azurecr.io --identity system
  4. D
    System-assigned managed identity; run: az containerapp secret set --name inventory-service --resource-group my-rg --secrets KeyVaultAccess=my-vault-url

Cevap

System-assigned managed identity; run: az containerapp identity assign --name inventory-service --resource-group my-rg --system-assigned
The correct option correctly identifies that a system-assigned managed identity is lifecycle-bound to the container app and uses the proper 'az containerapp identity assign' command with the '--system-assigned' flag to enable it.

Adım Adım Çözüm

1
Determine the required identity lifecycle behavior.
Since the identity must be automatically deleted when the container app is deleted, a system-assigned managed identity must be used instead of a user-assigned managed identity.
System-assigned managed identities are bound to the lifecycle of the specific Azure resource that created them.
2
Identify the correct Azure CLI command to enable the system-assigned managed identity.
The correct command is 'az containerapp identity assign --name inventory-service --resource-group my-rg --system-assigned'.
This command enables the system-assigned identity on the target container app, which will generate an identity in Microsoft Entra ID.

Anahtar Kavram

Azure Container Apps managed identity configuration and lifecycle management
Bu soruyu puanla