DELAPARRA
Index
Color
NL
Category: Terraform

apply

Explained by Updated

What is apply?

apply: Actually makes the changes to reach the desired state. Asks for confirmation unless you pass -auto-approve. terraform apply makes the real infrastructure match your configuration. It creates, changes or destroys cloud resources such as servers, databases and DNS records. By default it first shows a plan of every change and asks for confirmation. Read it. Lines marked with a minus or "must be replaced" mean something will be deleted, and for a database that can mean data loss.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about apply

What should you keep in mind with apply?

In teams and pipelines, the safer flow is terraform plan -out=tfplan, then a review, then terraform apply tfplan. That way the change applied is exactly the change someone approved. Avoid -auto-approve outside fully automated and well-tested pipelines. Keep state in a shared, locked backend, so two people cannot apply at the same moment and leave the state file out of sync with reality.

What does an example of apply look like?

terraform apply tfplan

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.