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.
More on Lifecycle, Dependencies, Provisioners and Drift
What are meta-arguments?BeginnerWhat lifecycle options are available?BeginnerHow does `create_before_destroy` work and what can go wrong?AdvancedWhat does `prevent_destroy` guarantee and what does it not?AdvancedWhen do you use `ignore_changes`?IntermediateWhat does `replace_triggered_by` do?Advanced