You are developing a background worker application that runs in Azure Container Apps. The application must scale dynamically based on the message count of an Azure Service Bus queue. You plan to use a user-assigned managed identity to authenticate the container app's scale rules with the Service Bus namespace.
Which sequence of steps should you perform to configure the scaling and security?
- 1Create a user-assigned managed identity.
- 2Assign the Azure Service Bus Data Receiver role to the managed identity.
- 3Associate the user-assigned managed identity with the Container App.
- 4Configure a scaling rule of type azure-servicebus on the Container App, referencing the identity.
Answer
Create the user-assigned managed identity, assign the Service Bus Data Receiver role to it, associate the identity with the Container App, and then configure the Service Bus scale rule referencing the identity.
The correct sequence begins with creating the user-assigned managed identity. Next, you must grant it the permissions needed to read from the queue by assigning the Azure Service Bus Data Receiver role. You then associate the identity with the Container App resource. Finally, you configure the azure-servicebus scale rule, referencing the associated identity.
Step-by-Step Solution
Key Concept
Azure Container Apps scale rules (KEDA) require a managed identity associated with the Container App and granted appropriate permissions on the target resource (like Service Bus) to monitor metrics for autoscaling.
Estimated Time:1m 30s