AZ-400 Question 182
Select 2You are a DevOps engineer at Tailwind Traders. The organization wants to roll out an Infrastructure as Code (IaC) approach using Azure Resource Manager (ARM) templates. They need to provision and configure identical development, testing, and production environments in Azure, while ensuring that each environment can be quickly created for parallel testing and removed once testing is complete. Which two approaches should you include in your Azure DevOps pipeline design to meet these requirements?
- A
Use a single ARM template to automatically create and tear down resource groups and resources for each environment.
- B
Store sensitive authentication credentials directly in the ARM templates for simplicity during deployment.
- C
Enable ephemeral environments in the pipeline to create short-lived environments for testing, then trigger automated clean-up tasks upon completion.
- D
Rely on manual environment creation using the Azure portal for development and testing deployments.
Show answer and explanation
Correct answers: A, C
Explanation
Azure Resource Manager templates (or other IaC technologies like Bicep/Terraform) ensure consistent, repeatable infrastructure deployments across multiple environments. Implementing ephemeral environments within the pipeline allows short-lived test environments to be spun up and destroyed automatically, aligning with DevOps best practices for efficiency, consistency, and cost management. For more details, refer to Microsoft� official ARM documentation (https://docs.microsoft.com/azure/azure-resource-manager/templates/) and guidance on ephemeral environments.
- A. Correct.
Correct. Creating a dedicated ARM template (or set of templates) allows consistent provisioning of resource groups and services. When integrated into a pipeline, it automates both the creation and removal of resources.
- B. Incorrect.
Incorrect. Embedding secrets directly in ARM templates is insecure and violates best practices. Secrets should be managed in secure stores such as Azure Key Vault, not placed in templates.
- C. Correct.
Correct. Ephemeral environments allow you to spin up temporary environments for testing without impacting production. Automating their creation and teardown ensures consistent, cost-efficient use of resources.
- D. Incorrect.
Incorrect. Relying on manual creation through the portal undermines the advantages of IaC, introduces room for human error, and complicates repeatable deployments.