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

How does `create_before_destroy` work and what can go wrong?

AdvancedConceptLifecycle, Dependencies, Provisioners and Drift
Answer

On replacement Terraform builds the new object first, then destroys the old, avoiding downtime for things like load balancer targets or certificates. Problems: names or unique values must not collide (use name_prefix or random suffixes), quota limits may be hit temporarily, and the flag propagates to dependencies, which can create unexpected cycles.

All Terraform questions Roadmap: Terraform in production

More on Lifecycle, Dependencies, Provisioners and Drift