A company requires a lightweight compute solution to run a batch utility in Azure. The utility connects to a database, processes transaction records, and then exits. If the utility encounters a database connection error during its run, it must automatically attempt to rerun. However, if the process finishes successfully, it must terminate and remain stopped until the next scheduled run. You also need to protect the database credentials used by the utility from being exposed in plain text in the deployment configuration.
Which two options should you configure for the Azure Container Instances (ACI) deployment? (Select two.)
- Set the restart policy of the container group to OnFailure.Cevap
- Define the database credentials as secure environment variables.Cevap
- CSet the restart policy of the container group to Always.
- DSet the restart policy of the container group to Never.
- EDeploy the container group inside an Azure Availability Set.
Cevap
Configure the container group restart policy to OnFailure and pass the database credentials as secure environment variables.
Setting the container group's restart policy to OnFailure ensures that the container automatically restarts only if its execution exits with an error code, which aligns with the requirement to retry on a database connection error. Configuring credentials as secure environment variables prevents the sensitive data from being visible in clear text when querying the container group's properties or viewing it in the Azure portal.
Adım Adım Çözüm
Anahtar Kavram
Azure Container Instances (ACI) restart policies and secure environment configuration