Interview › Infrastructure as Code (Terraform, Ansible)
How do you review and approve infrastructure changes safely as a team?
Infrastructure as Code (Terraform, Ansible) · Advanced level
Answer
I review infrastructure changes safely by requiring plans in pull requests, checking policy and security rules, using saved plans for apply, locking state, separating dev and prod permissions, requiring approvals for destructive changes, and keeping audit trails for who approved and applied each change.
Technical explanation
Plans and rendered manifests should be attached to pull requests.
Approvals should focus on blast radius, data loss, IAM, public exposure, and cost impact.
Emergency paths should exist but still leave an audit trail and follow-up review.
Keep source manifests or IaC definitions readable enough that reviewers can understand the final desired state.
Use overlays, modules, or roles for reuse, but keep environment-specific differences explicit and reviewable.
Validate generated output in CI before applying it through kubectl, Argo CD, Terraform, or Ansible.
Hands-on example
1. Implement a team workflow for: How do you review and approve infrastructure changes safely as a team?
2. Use a repository layout that separates reusable building blocks from environment entrypoints:
iac/
terraform/modules/
terraform/envs/dev|stage|prod/
ansible/roles/
kubernetes/base/
kubernetes/overlays/dev|stage|prod/3. For every pull request, generate Terraform plans, render Kustomize output, run ansible-lint, and attach summaries for review.
4. Require owners to approve changes touching IAM, networking, data stores, secrets, and production overlays.
5. After merge, apply through controlled pipelines with state locking, audit logs, and drift detection tickets for anything changed manually.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Infrastructure as Code (Terraform, Ansible) interview questions
- How do you keep IaC DRY across many similar microservices?
- What recent IaC practice or tool have you adopted, and what did it improve?
- What are the trade-offs of templating (Helm) versus patching (Kustomize)?
- How do you detect and remediate IaC drift continuously rather than only at apply time?
- How does ArgoCD work with Kustomize overlays for multiple environments?
- How would you onboard an existing manually-built environment into IaC with confidence?
- When would you choose Kustomize over Helm, and can you use them together?
- How is Kustomize integrated natively into kubectl (kubectl apply -k)?