InterviewStack.io LogoInterviewStack.io

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
34 practiced

For patching a fleet of VMs, when would you reach for rebuilding and replacing the image entirely instead of patching hosts in place? Walk through how you'd canary a patch rollout either way, what you'd watch to catch a bad patch, and how you'd roll it back.

EasyTechnical
21 practiced

What's the practical difference between a resource and a data source in Terraform? Give an example of each in a typical module, and explain how a data source changes what shows up in plan and how it affects the dependency graph.

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
35 practiced

Before a Terraform or CloudFormation change ever reaches apply, what automated checks would you want running in the pipeline, and at what stage would each one run? Talk through what kind of mistake each check is actually meant to catch.

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?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.