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

How would you design a Terraform module that other teams can safely reuse across dev, staging, and prod? Talk through directory layout, how you'd handle inputs and defaults, and how you'd version it so consumers aren't afraid to upgrade.

HardTechnical
19 practiced

Say the database backing a high-traffic production service is provisioned and managed through your IaC pipeline, and you need to change its schema. How do you sequence the schema change against the infrastructure rollout so you don't risk data loss or downtime, and what's your fallback if something goes wrong partway through?

HardSystem Design
24 practiced

You've got an existing fleet of long-running VMs that get patched in place, and you want to move them to an immutable, image-based deployment model instead. Walk through how you'd get there: building and validating the images, rolling the fleet over without a big-bang cutover, and handling the stateful pieces that can't just be thrown away and replaced.

EasyTechnical
26 practiced

Your application module needs to attach to a VPC and subnets that were created by a separate team. How would you consume that existing infrastructure in Terraform, and what would you check to make sure the module fails loudly if the network layout is not what you expect?

HardSystem Design
20 practiced

Design the machine-image pipeline for a fleet of stateless instances behind a load balancer: how images get built and tested, how you promote an image across environments, and how you actually swap the fleet over to a new image with health checks and connection draining so nothing gets dropped. How would this change if you also needed to fast-track an urgent security patch?

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.