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.
EasyBehavioral
0 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.
HardTechnical
0 practiced
Design a secure cross-account access model that allows CI/CD runners in a central AWS account to run Terraform to manage resources in multiple target accounts. Cover IAM roles, assume-role patterns, STS usage, remote backend placement per account, credential scoping, and auditability.
EasyTechnical
0 practiced
Write an Ansible playbook (YAML) that installs and starts nginx on Ubuntu hosts. Ensure idempotency, use a handler to restart the service only when configuration changes, and include an example task that deploys an nginx config template with variables.
HardTechnical
0 practiced
Explain how to implement policy-as-code for IaC at scale (choices include OPA, Sentinel, or CI gates). Describe enforcement points (pre-commit, PR checks, pipeline, pre-apply), example policies (no public S3, tagging required, allowed instance types), and how to handle emergency exceptions.
EasyTechnical
0 practiced
Explain Terraform state: what it contains, why remote state/backends (e.g., S3 + DynamoDB) are used in teams, and what role state locking plays. Also describe what could go wrong if state is stored locally and shared via git.
Unlock Full Question Bank
Get access to hundreds of Infrastructure as Code Tool Proficiency (Terraform/CloudFormation/Ansible) interview questions and detailed answers.