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.

HardTechnical
22 practiced

As a senior engineer, you're asked to move a large legacy on-prem environment into IaC-managed cloud resources, essentially a hybrid-cloud migration. Walk through how you'd sequence this to keep risk low: discovery and inventory, deciding what to import versus rebuild from scratch, testing, and what the cutover runbook looks like.

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?

MediumTechnical
21 practiced

You need one module to create a resource only when a feature flag is enabled, and also create one related object per item in a caller-provided list. How would you keep that configuration maintainable as the list grows or changes order over time?

HardTechnical
22 practiced

An internal module is already used by several teams, and you need to add a new capability without breaking existing consumers. How would you evolve the module, version it, and communicate the change so upgrades stay predictable?

EasyTechnical
17 practiced

When would you pull resources out into a reusable module instead of leaving them in the root configuration? Explain what makes a good module boundary, and what you'd call over-modularization.

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.