Ad space (banner)
AD

Got the fundamentals? A structured Terraform course is a fast way to level up.

Find Terraform courses on Udemy

Affiliate link. Costs you nothing extra.

Lesson 26 / 37

Applying a Saved Plan with terraform apply

When you have a saved plan, pass it to terraform apply. It executes exactly those actions, with no re-planning and no prompt.

The syntax is terraform apply planfile.

Running terraform apply tfplan carries out precisely the actions recorded in that file.

A common stumble is applying a stale plan after the infrastructure has moved on. Terraform will refuse if state has changed, which is the safety net working.

In real work, this two-step — plan, review, apply the reviewed plan — is the backbone of a safe production pipeline.

Terraform
Try it (type this into the pseudo terminal)
terraform apply tfplan

🧑‍💻 You can type this command into the Terraform pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)