InterviewStack.io LogoInterviewStack.io

Infrastructure as Code Tool Proficiency (Terraform/CloudFormation/Ansible) Questions

Deep proficiency in at least one IaC tool. For Terraform: understand resources, data sources, variables, outputs, local values, modules, state management, state locking, backend configuration (S3, Terraform Cloud), and best practices (remote state, sensitive variables, module organization). For CloudFormation: understand templates (YAML/JSON), stacks, parameters, conditions, mappings, resources, outputs, and intrinsic functions. For Ansible: understand playbooks, roles, inventory, variables, handlers, and idempotency. Write reusable, maintainable code: modules for Terraform, roles for Ansible. Understand code organization, naming conventions, and team collaboration practices.

EasyTechnical
23 practiced
Describe a semantic versioning and release workflow for Terraform modules: how you would structure tags, changelogs, breaking changes policy, and module registry usage. How should consumers pin module versions to avoid unexpected changes?
MediumTechnical
32 practiced
Your CI currently runs `terraform apply` automatically on merges to main. On rare PR mistakes this caused production outages. Propose a safer CI/CD pipeline and gating strategy for Terraform and Ansible changes that reduces risk while preserving velocity.
EasyBehavioral
30 practiced
Tell me about a time when you contributed to a shared Infrastructure-as-Code module or Ansible role. Describe the situation, your specific actions on ownership and documentation, how you handled code reviews, and how you onboarded new contributors to the module.
HardSystem Design
31 practiced
Design an enterprise-scale Terraform architecture for a multi-region, multi-account AWS environment with thousands of engineers. Cover module registry approach, remote state isolation, cross-account role assumptions, CI/CD pipeline separation, drift prevention, secrets, and governance (policy-as-code). Provide a high-level diagrammatic description of components and responsibilities.
EasyTechnical
30 practiced
Write a Terraform variable declaration (variables.tf) that defines a `region` variable restricted to a list of allowed regions (e.g., us-east-1, us-west-2) with a default, and a `db_password` variable marked as sensitive with no default. Include a validation block for the region.

Unlock Full Question Bank

Get access to hundreds of Infrastructure as Code Tool Proficiency (Terraform/CloudFormation/Ansible) interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.