Terraform apply
terraform apply is a Terraform command that executes planned changes to create, modify, or delete managed infrastructure resources.
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
terraform apply is the Terraform command that compares configuration with recorded state and applies the required infrastructure changes.
- How it is used
- Executes Terraform configuration to create and iteratively update cloud infrastructure.
- How deep it goes
- Explains plan generation, approval, completion output, auto-approval, dependencies, and repeated application, but not command internals.
- Examples
- Demonstrates Azure resource groups, container registries, Kubernetes clusters, approval prompts, and destroy-and-recreate experiments.
- What you can do after
- Operate Terraform to review and approve infrastructure changes, automate applies, and rebuild cloud resources from configuration.
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
terraform apply is the Terraform command that executes the actions specified by an execution plan.
- How it is used
- Executes a plan’s actions to bring infrastructure into line with a Terraform configuration.
- How deep it goes
- Explains saved-plan and combined-command workflows, approval choices, and streamed output; stops short of detailing how individual provider actions execute.
- Examples
- Uses an AWS module test workspace, local TLS resource creation, and a Terraform test assertion dependent on an applied output.
- What you can do after
- Operate/configure it to review and apply infrastructure changes, or stream apply events through an automation wrapper.
Related concepts
- Terraform state fileuses · A file that persistently records Terraform’s representation of managed infrastructure resources and their attributes, linking configuration to real-world instances.
- deploymentused by · Deployment is the process of making software, models, or other computational systems available to operate in a target environment.
- terraform.Destroyequivalent to · terraform.Destroy is a Terratest helper function that runs Terraform destruction to remove resources managed by a test.
- Azure resource groupproduces · An Azure resource group is a logical management container for organizing related Azure resources and managing them as a unit.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

