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.

HardSystem Design
31 practiced

You're designing the secrets management layer for a company that runs infrastructure across multiple clouds and is subject to strict compliance requirements, PCI or SOC 2 for example. Walk me through how you'd architect secret storage, access control, and rotation so it satisfies both the engineers who need to use it day to day and the auditors who need to sign off on it.

MediumTechnical
34 practiced

A repo has one large Terraform entrypoint that manages several environments and shared pieces of infrastructure. The team is having merge conflicts and accidental cross-environment changes. How would you reorganize the code so engineers can work in parallel with less risk?

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?

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?

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?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.