Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesMedium

A DevOps team is migrating an existing application to a microservices architecture on Azure. They need to provision and manage the infrastructure for each microservice, including compute, networking, and storage, in a repeatable and consistent manner. The team wants to use a tool that supports declarative configuration, allows for state management, and can target multiple cloud providers, although their current focus is Azure. Which Infrastructure as Code (IaC) tool is the most appropriate choice?

  1. ATerraform
  2. BAzure Bicep
  3. CAzure Resource Manager (ARM) templates
  4. DAzure CLI scripts
Show answer & explanation

Correct answer: A. Terraform

Terraform is an open-source IaC tool that supports declarative configuration and state management. Crucially, it is cloud-agnostic, meaning it can provision and manage infrastructure across multiple cloud providers (like Azure, AWS, GCP), which aligns with the potential need for multi-cloud capabilities, even if the current focus is Azure.

Why the other options are wrong

  • B. Azure Bicep is a declarative language for Azure resources, offering improvements over ARM templates, but it is still Azure-specific and not multi-cloud.
  • C. ARM templates are declarative and Azure-specific, but not multi-cloud.
  • D. Azure CLI scripts are imperative, not declarative, and lack inherent state management, making them less suitable for repeatable and consistent infrastructure provisioning at scale.

Terraform for Multi-Cloud IaC

Terraform is an open-source Infrastructure as Code tool that enables declarative provisioning and management of cloud resources across multiple cloud providers, including Azure, with state management capabilities.

  • Declarative configuration language (HCL).
  • Manages infrastructure state.
  • Cloud-agnostic (supports many providers).
  • Ideal for repeatable and consistent infrastructure provisioning.

Memory trick: Terraform: Your Cross-Cloud Infrastructure Architect.

More Design and implement pipelines questions