Infrastructure as Code and Automation Questions

Defining, provisioning, and automating infrastructure programmatically. Covers declarative IaC with Terraform and comparable tools like CloudFormation (resource and provider model, state management and remote backends, module design and reuse, workspaces, drift detection, and safe plan/apply workflows), plus the broader automation discipline: provisioning pipelines, golden-image and machine-image building, scripting glue, self-service platforms, and end-to-end environment stand-up. The authoring, lifecycle, and automation of infrastructure code that reduces manual toil across provisioning workflows.

MediumTechnical
24 practiced

A reusable module has to work across dev, staging, and prod, but each environment needs different sizes, tags, and resource names. How would you design the module interface so callers can customize it without editing the module code?

MediumTechnical
22 practiced

Terraform shows a live resource as missing, but the cloud console says it still exists. You suspect the object was originally created outside Terraform and later partially brought under management. How would you decide whether to import it, recreate it, or leave it alone?

MediumTechnical
21 practiced

A service stores database credentials and API keys in Terraform variables today, and the team is worried about exposure. How would you redesign the workflow so Terraform can still provision the stack without making secrets visible to everyone who can read the repo or the state?

HardTechnical
20 practiced

Before a production apply, what review and automation guardrails would you put around the Terraform workflow so an engineer can catch unexpected destroys or replacements before they reach users?

EasyTechnical
23 practiced

A teammate hands you a Terraform file that provisions a new environment from scratch. Before it can be applied to a shared cloud account, what would you review in the provider configuration, resource definitions, variables, and outputs to make sure the configuration is readable, parameterized, and not hiding risky assumptions?

Unlock Full Question Bank

Get access to all 12 Infrastructure as Code and Automation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.