Lesson 12 of 12 - Cloud and infrastructure as code
Terraform plan, apply and state
By Branko Petric - Updated - About 8 min - Full access
The short answer
Terraform compares your code with its state file and the real cloud, then shows a plan of what it will create, change or destroy. Read every plan before applying, especially replacements and destroys. Keep state in a remote backend with locking, never in Git, because it maps code to real resources and can hold secrets.
Want the bigger picture? This lesson maps to this step of the DevOps roadmap.