Interview Prep/Terraform/Lifecycle, Dependencies, Provisioners and Drift

How do you remediate drift?

AdvancedConceptLifecycle, Dependencies, Provisioners and Drift
Answer

Decide which side is right. If code is right, apply to revert reality. If the manual change should stay, update the code to match (or apply -refresh-only to accept it into state, then align code). If an external system legitimately owns an attribute, use ignore_changes. Then fix the process that allowed the manual edit, such as tighter IAM.

All Terraform questions Roadmap: Terraform in production

More on Lifecycle, Dependencies, Provisioners and Drift