![Forrest logo](/images/logo.png)
terragrunt:tldr:731e6
The command "terragrunt apply" is used with the Terraform tool to apply changes to your infrastructure based on the configuration defined in Terraform files.
Terragrunt is a thin wrapper around Terraform that helps with managing multiple Terraform modules and configurations in a consistent and reusable way. It simplifies the configuration and operations of Terraform, providing extra features and adding more power to the workflow.
When you run "terragrunt apply", Terragrunt will first determine the list of targets to apply changes to by traversing the Terraform module dependencies. It will then execute Terraform's "apply" command for each target in the correct order, ensuring that dependencies are applied first.
The "apply" command is an essential Terraform command that creates or updates resources in the specified target environment. It reads the Terraform configuration files (usually written in HCL - HashiCorp Configuration Language), checks the current state, compares it to the desired state, and automatically provisions, modifies, or deletes resources to reach the desired state.
Before applying any changes, Terraform will present a summary of the modifications it plans to make. It will show which resources will be created, modified, or destroyed. You will have an opportunity to review these changes and confirm the action before Terraform proceeds with the execution.
Executing "terragrunt apply" can have a significant impact on your infrastructure, so it's crucial to understand the changes being made and to have a proper backup plan. It's highly recommended to review the execution plan beforehand and ensure that you are executing it with the necessary permissions and in the correct environment.