Soru

Zorluk: OrtaDeploy and Configure Azure Container Apps

You are deploying a backend microservice named `inventory-service` to an Azure Container Apps environment. The microservice runs inside a container that listens on port 3000 and needs to integrate with Dapr to enable state management and service-to-service invocation using the application ID `inventory-processor`. You are authoring a Bicep template to deploy the container app. Which two settings must you configure within the `dapr` block under `properties.configuration` to successfully enable Dapr integration and register the microservice?

  1. enabled: trueCevap
  2. appId: 'inventory-processor'Cevap
  3. C
    identity: { type: 'SystemAssigned' }
  4. D
    appPort: 80

Cevap

The settings enabled set to true and appId set to 'inventory-processor' are required inside the dapr block.
To successfully enable and configure Dapr for an Azure Container App in a Bicep template, the dapr object under properties.configuration must have enabled set to true to trigger sidecar injection, and appId set to the required string value ('inventory-processor') to define the application's service identification.

Adım Adım Çözüm

1
Enable the Dapr sidecar injection by configuring the enabled boolean property.
enabled is set to true within the dapr block.
This instructs the Container Apps runtime to inject the Dapr sidecar container alongside the application container.
2
Assign the unique identifier for service discovery and state retrieval.
appId is set to 'inventory-processor'.
This specifies the application ID that other services in the environment will use to invoke methods on this microservice.

Anahtar Kavram

Dapr integration configuration in Azure Container Apps Bicep templates
Bu soruyu puanla