/plushcap/analysis/spacelift/terraform-apply

When to Run Terraform Apply – Quick Usage Examples

What's this blog post about?

The `terraform apply` command is used to deploy infrastructure as described in configuration files. It executes the actions proposed in a `terraform plan`. Typically, `apply` should be run after `terraform init` and `terraform plan`. If run without options, it generates a plan, asks for confirmation, and then applies changes. The command can also use a previously generated planfile or pass in variable values. It is safe to run multiple times if there are no changes in the configuration files. In automation, `terraform apply` can be used with the plan output file or with the `-auto-approve` option for CI/CD pipelines. Spacelift offers a more robust way of automating infrastructure provisioning lifecycle and managing Terraform state.

Company
Spacelift

Date published
June 9, 2022

Author(s)
Jack Roper

Word count
603

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.