An organization is configuring an existing Linux-based Azure Function App named `contosofn` running on an Elastic Premium plan to deploy and pull its custom container image from a private Azure Container Registry (ACR) named `contosoacr`. You have created a user-assigned managed identity named `fn-pull-identity`. You must configure `contosofn` to pull the custom image from `contosoacr` using `fn-pull-identity`. Which four 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.
- 1Associate the user-assigned managed identity `fn-pull-identity` with the `contosofn` Function App.
- 2Assign the `AcrPull` role to `fn-pull-identity` at the scope of the `contosoacr` registry.
- 3Configure the `AcrUseManagedIdentityCreds` app setting to `true` and the `AcrUserManagedIdentityID` app setting to the client ID of `fn-pull-identity`.
- 4Update the container settings of `contosofn` to specify the target Docker image from `contosoacr`.
Cevap
Associate the user-assigned managed identity with the Function App, assign the AcrPull role to the identity at the registry scope, configure the AcrUseManagedIdentityCreds and AcrUserManagedIdentityID app settings, and then update the container image configuration.
To configure a containerized Azure Function to pull from a private ACR using a user-assigned managed identity, you must first register the identity with the resource, authorize the identity at the source registry using the AcrPull role, configure the application settings to use the identity (AcrUseManagedIdentityCreds = true and AcrUserManagedIdentityID = client ID), and finally set the image setting. Setting the image setting triggers the image pull, so the authorization infrastructure must be fully set up beforehand.
Adım Adım Çözüm
Anahtar Kavram
Configuring identity-based container deployment for Azure Functions using user-assigned managed identities.