← 🏗️ Declarative Infrastructure
Advanced
Terraform lifecycle rules: replacement ordering, destroy protection and drift ownership
Explain create_before_destroy, prevent_destroy and ignore_changes through their actual boundaries. Work through a replacement that needs spare capacity and an attribute owned by another controller.
View Premium accesscourse lessons, concepts and answers · see current terms
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Infrastructure as Code & ConfigurationFive hundred resources were built by hand over three years and must come under Terraform. Walk me through importing them without breakage.→Infrastructure as Code & ConfigurationResources keep changing outside Terraform and plans show surprises weeks later. How do you detect drift early, and who may change things?→Infrastructure as Code & ConfigurationA routine change wants to replace a production resource. How do Terraform updates become replacements, and what controls that?→Infrastructure as Code & ConfigurationAn apply planned to destroy and recreate the production database. Which lifecycle arguments belonged on that resource?→Infrastructure as Code & ConfigurationEveryone does GitOps for Kubernetes. Can the same model govern plain cloud infrastructure, and what breaks in translation?→Infrastructure as Code & ConfigurationWalk me through terraform init, plan, apply and destroy. What is each one actually doing?→