Cloud · General Cloud

Infrastructure as Code (Terraform, CloudFormation, Pulumi)

Mediumiacterraformcloudformationpulumidevops

Interview question

What is Infrastructure as Code, and how do Terraform, CloudFormation, and Pulumi differ?

How to answer

The short answer

Infrastructure as Code (IaC) means defining cloud resources (VPCs, buckets, roles, warehouses) in files that are versioned, reviewed, and applied repeatably, instead of clicking in consoles.

Why DE teams care

Lakes, IAM, Glue jobs, and networking must be reproducible across dev/stage/prod. Console clicks drift and cannot be code-reviewed.

Tool contrast

ToolStyleCloudsNotes
TerraformHCL declarativeMulti-cloudHuge ecosystem; state file
AWS CloudFormationYAML/ templatesAWS-onlyNative AWS; StackSets
PulumiReal languages (TS/Python/Go)Multi-cloudPrefer code over HCL

Fresher example

A Terraform module creates an S3 bucket + IAM role + Glue job. PR review catches a public bucket ACL before apply.

Interview tip: Define IaC as versioned infra definitions, then say Terraform = multi-cloud HCL, CloudFormation = AWS-native, Pulumi = IaC in general-purpose languages.