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?
- System-assigned managed identity; run: az containerapp identity assign --name inventory-service --resource-group my-rg --system-assignedCevap
- BUser-assigned managed identity; run: az containerapp identity assign --name inventory-service --resource-group my-rg --user-assigned my-identity-resource-id
- CSystem-assigned managed identity; run: az containerapp registry set --name inventory-service --resource-group my-rg --server myregistry.azurecr.io --identity system
- DSystem-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
Anahtar Kavram
Azure Container Apps managed identity configuration and lifecycle management