InterviewStack.io LogoInterviewStack.io

Infrastructure as Code and Configuration Management Questions

Infrastructure as Code and Configuration Management covers designing, implementing, and operating infrastructure defined as code and the practices that keep that infrastructure consistent and auditable. Topics include Infrastructure as Code principles and patterns, declarative versus imperative approaches, idempotency, state management, module and template design for reusable infrastructure, version control integration, testing and validation of infrastructure code, drift detection and remediation, safe rollout and rollback strategies, policy as code and Git operations for infrastructure, and how to scan and remediate infrastructure misconfigurations. This topic also encompasses integration points with system configuration tools and considerations for managing secrets and secure defaults within infrastructure definitions.

EasyTechnical
29 practiced
Write a minimal CloudFormation (YAML) template that creates an S3 bucket with versioning enabled and default server-side encryption (AES256). Explain how CloudFormation ensures idempotency and describe what happens when the logical resource name or BucketName changes between deployments.
HardTechnical
35 practiced
During a high-severity incident you discover a Terraform change deleted critical subnets causing service outages. As the SRE on-call, outline your immediate incident response actions, recovery steps including rollback vs manual repair, communication plan for stakeholders, and post-incident improvements to prevent recurrence.
HardTechnical
33 practiced
Design an automated drift remediation system that detects resource drift and remediates non-critical drift automatically while alerting for critical resources. Include detection methods, reconciliation frequency, throttling/backoff, safety gates to avoid thrash, and audit/logging requirements an SRE would enforce.
HardSystem Design
31 practiced
You inherited a monolithic Terraform repo that manages tens of thousands of resources. Propose a plan to restructure the codebase and states to improve team autonomy, reduce plan/apply times, and prevent accidental global changes. Discuss state sharding, repo organization, CI changes, and measures to prevent resource collisions.
MediumTechnical
31 practiced
Compare Ansible and Terraform with respect to provisioning OS-level configuration (packages, services) and cloud resources. For common SRE tasks such as package installs, service configuration, and provisioning cloud infrastructure, explain when to use each tool and how to integrate them without causing conflicts.

Unlock Full Question Bank

Get access to hundreds of Infrastructure as Code and Configuration Management interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.