⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Linux & SRE Interview Questions Scenario 28 of 135 in Linux & SRE
Senior DevOps / SRE [L2] General DevOps General DevOps — Scenario-Based Interview Questions Production Scenario [L2]

Q: A critical infrastructure configuration was manually modified via the AWS Console at 3 AM to fix an outage (Configuration Drift). The next morning, a CI pipeline runs `terraform apply` for an unrelated change. What happens and how do you reconcile this?

Because Terraform is declarative, it compares the desired state (the code) with the actual state (the AWS environment).

#General DevOps #L2 #DevOps #SRE #Architecture
🎙️ Candidate Opening & Architectural Context
""In our engineering organization, DevOps culture meant aligning developer speed with site reliability. The interviewer is testing: Infrastructure as Code drift, declarative state reconciliation.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? The Linux Foundation's Certified System Administrator (LFCS) & SRE Track covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: "In our engineering organization, DevOps culture meant aligning developer speed with site reliability. The interviewer is testing: Infrastructure as Code drift, declarative state reconciliation.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Production Solution & Architecture

Because Terraform is declarative, it compares the desired state (the code) with the actual state (the AWS environment). When terraform apply runs, it will detect the 3 AM manual CLI/Console change, mark it as drift, and destroy the manual fix to revert the infrastructure back to exactly what is defined in the .tf files. To reconcile this: The manual change must be codified *before* anyone runs apply. A developer needs to write the equivalent Terraform code matching the manual 3 AM fix, run terraform plan to ensure zero changes are pending (meaning the code now perfectly matches reality), and then merge that code to main.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Because Terraform is declarative, it compares the desired state (the code) with the actual state (the AWS environment). When terra."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: Because Terraform is declarative, it compares the desired state (the code) with the actual stat
  • Run targeted verification commands before modifying configuration.
  • Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Engineering bespoke in-house developer tools instead of adopting standardized platform Golden Paths when configuring General critical configuration Bespoke internal tools create long-term maintenance debt and fragmented workflows, whereas standardized Golden Paths accelerate delivery.
  2. Overlooking infrastructure cost visibility and FinOps allocation tagging across multi-tenant environments when configuring General critical configuration Without granular resource tagging, engineering organizations cannot attribute cloud infrastructure costs to specific teams or business units.
  3. Failing to define explicit Service Level Objectives (SLOs) and Error Budgets to balance feature velocity with reliability when configuring General critical configuration Without agreed SLOs, engineering and product teams lack an objective data-driven framework to prioritize technical debt over new features.
  4. Neglecting automated continuous drift detection between declarative configuration and deployed cloud state when configuring General critical configuration Unmanaged drift accumulates over time, causing future automated deployments to fail or overwrite emergency manual adjustments.
Advertisement
Want more Linux & SRE scenarios?
Explore our complete collection of scenario-based Linux & SRE interview runbooks.
Browse All Linux & SRE Questions →