How did you protect critical resources from accidental deletion?
BeginnerBehavioralInfrastructure as Code & Terraform state
Answer
Good answer looks like → "lifecycle { prevent_destroy = true } on databases, state buckets and KMS keys; deletion_protection = true on RDS and load balancers; S3 versioning; and a CI check that fails if the plan contains any delete on resources tagged critical=true unless a specific PR label is present."
Follow-ups to expect → What if someone removes the prevent_destroy line? Did it ever save you?
Red flags → Relying only on "being careful".
More on Infrastructure as Code & Terraform state
What did your Terraform state setup look like?IntermediateHow did you structure your Terraform code?BeginnerWhy did you use folders per environment rather than Terraform workspaces (or vice versa)?IntermediateHow did different Terraform stacks share information?IntermediateDid you ever have a state lock or corrupted state? What did you do?AdvancedHow did you handle Terraform drift?Intermediate