Skip to main content

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​

  1. Navigate to Deploy > Workflow Groups.

  2. Click Create Workflow, select "Use Wizard", and then choose "Custom".

    Step 1

Step 2: Configure Source and Parameters​

  1. Enable VCS Settings to connect your Git repository.

  2. Select Git Repository and provide the repository URL, branch, or tag as needed.

  3. Customize advanced options like Working Directory and Sparse Checkout Config if required. Click "Next".

    Step 2

Step 3: Configure Runtime Environment​

  1. Select a deployment environment or create new environment variables.

  2. Choose the execution environment (Shared or Private Runner).

  3. Click Add New Step to proceed.

    Step 3

Step 4: Configure Workflow Steps​

  1. Enter a Step Name (e.g., terragrunt-apply).

  2. Select the Workflow Step Template and Revision.

  3. 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.
  4. Specify Terraform Version and optional parameters like Command Override.

    Step 4

Step 5: Add Workflow Metadata​

  1. Provide a Workflow Name, Description, and optional Tags.

  2. Assign the workflow to a Workflow Group.

    Step 5

Step 6: Review and Launch​

  1. Review the configured workflow.
  2. Click Launch Workflow to start execution.
    Step 6

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.