Terragrunt Workflow
A Terragrunt workflow simplifies the management of Terraform configurations using Terragrunt. It enables you to structure, validate, and deploy Terraform-based infrastructures efficiently.
Create a Terragrunt Workflow​
Follow these steps to create and configure a Terragrunt workflow:
Step 1: Launch a New Workflow​
-
Navigate to Deploy > Workflow Groups.
-
Click Create Workflow, select "Use Wizard", and then choose "Custom".
Step 2: Configure Source and Parameters​
-
Enable VCS Settings to connect your Git repository.
-
Select Git Repository and provide the repository URL, branch, or tag as needed.
-
Customize advanced options like Working Directory and Sparse Checkout Config if required. Click "Next".
Step 3: Configure Runtime Environment​
-
Select a deployment environment or create new environment variables.
-
Choose the execution environment (Shared or Private Runner).
-
Click Add New Step to proceed.
Step 4: Configure Workflow Steps​
-
Enter a Step Name (e.g.,
terragrunt-apply
). -
Select the Workflow Step Template and Revision.
-
Choose the Terragrunt Action:
plan for create
: Generate a Terraform plan for new infrastructure.apply from plan
: Apply a previously generated plan.plan for destroy
: Plan for infrastructure destruction.destroy-all
: Destroy all resources.
-
Specify Terraform Version and optional parameters like Command Override.
Step 5: Add Workflow Metadata​
-
Provide a Workflow Name, Description, and optional Tags.
-
Assign the workflow to a Workflow Group.
Step 6: Review and Launch​
- Review the configured workflow.
- Click Launch Workflow to start execution.
Available Terragrunt Actions​
Below are the available Terragrunt actions and their use cases:
- plan for create: Generate a plan to deploy new resources.
- apply from plan: Apply a saved plan to execute changes.
- plan for destroy: Preview the destruction of resources without executing it.
- destroy-all: Remove all resources defined in the configuration.
- plan-all: Generate plans for all modules in the configuration.
- apply-all: Apply changes for all modules in the configuration.
- detect drift: Identify differences between the current state and the desired configuration.
This Terragrunt workflow allows users to manage Terraform configurations effortlessly, ensuring scalability, efficiency, and maintainability for infrastructure-as-code deployments.
Overview​
The Overview tab highlights key workflow details, including compliance check results, cost estimations, and resource summaries like drift detection and schedules. It offers a quick snapshot of your workflow's status.
Learn more in the Workflow Overview Guide.
Runs​
The Runs tab lists all executions with real-time status, unique run IDs, and metadata, such as user actions and modification timestamps. Click a Run ID to view detailed logs and execution progress.
Explore the Workflow Runs Guide.
Outputs​
The Outputs tab displays execution results and downloadable artifacts like tfstate.json
. Use key-value pairs to reference outputs in other workflows, making your infrastructure provisioning more dynamic.
See the Workflow Outputs Guide.
Settings​
The Settings tab enables post-creation updates, such as modifying input variables, refining Terraform runtime settings, reordering custom steps, or managing cloud connectors and environment variables.
Learn more in the Workflow Settings Guide.