Spacelift
PrivacyT&Cs
  • 👋Hello, Spacelift!
  • 🚀Getting Started
  • 🌠Main concepts
    • Stack
      • Creating a stack
      • Stack settings
      • Organizing stacks
      • Stack locking
      • Drift detection
    • Configuration
      • Environment
      • Context
      • Runtime configuration
        • YAML reference
    • Run
      • Task
      • Proposed run (preview)
      • Tracked run (deployment)
      • Module test case
      • User-Provided Metadata
      • Run Promotion
      • Pull Request Comments
    • Policy
      • Login policy
      • Access policy
      • Approval policy
      • Initialization policy
      • Plan policy
      • Push policy
      • Task policy
      • Trigger policy
    • Resources
    • Worker pools
    • VCS Agent Pools
  • 🛰️Platforms
    • Terraform
      • Module registry
      • External modules
      • Provider
      • State management
      • Terragrunt
      • Version management
      • Handling .tfvars
      • CLI Configuration
      • Cost Estimation
      • Resource Sanitization
      • Storing Complex Variables
      • Debugging Guide
    • Pulumi
      • Getting started
        • C#
        • Go
        • JavaScript
        • Python
      • State management
      • Version management
    • CloudFormation
      • Getting Started
      • Reference
      • Integrating with SAM
      • Integrating with the serverless framework
    • Kubernetes
      • Getting Started
      • Authenticating
      • Custom Resources
      • Helm
      • Kustomize
  • ⚙️Integrations
    • Audit trail
    • Cloud Integrations
      • Amazon Web Services (AWS)
      • Microsoft Azure
      • Google Cloud Platform (GCP)
    • Source Control
      • GitHub
      • GitLab
      • Azure DevOps
      • Bitbucket Cloud
      • Bitbucket Datacenter/Server
    • Docker
    • GraphQL API
    • Single sign-on
      • GitLab OIDC Setup Guide
      • Okta OIDC Setup Guide
      • OneLogin OIDC Setup Guide
      • Azure AD OIDC Setup Guide
      • AWS IAM Identity SAML 2.0 Setup Guide
    • Slack
    • Webhooks
  • 📖Product
    • Privacy
    • Security
    • Support
      • Statement of Support
    • Disaster Continuity
    • Billing
      • Stripe
      • AWS Marketplace
    • Terms and conditions
    • Refund Policy
  • Cookie Policy
Powered by GitBook
On this page
  • Using Terragrunt
  • Versioning with Terragrunt
  • Scope of support
  • Debugging Terragrunt

Was this helpful?

  1. Platforms
  2. Terraform

Terragrunt

PreviousState managementNextVersion management

Last updated 3 years ago

Was this helpful?

Using Terragrunt

Whether a Terraform stack is using Terragrunt or not is controlled by the presence of terragrunt label on the stack:

If present, all workloads will use terragrunt instead of terraform as the main command. Since Terragrunt API is a superset of Terraform's, this is completely transparent to the end user.

During the Initialization phase we're showing you the exact binary that will process your job, along with its location:

Versioning with Terragrunt

On our runner image, we install a version of Terragrunt that will work with the latest version of Terraform that we support. If you need a specific version of Terragrunt, feel free to create a custom runner image and install the Terragrunt version of your choosing.

Scope of support

Debugging Terragrunt

Similar to Terraform, Terragrunt provides an advanced logging mode, and as of the writing of this documentation, there are currently two ways it can be enabled:

1) Using the --terragrunt-log-level debug CLI flag (You'll need to set this flag using the TF_CLI_ARGS environment variable. For example, TF_CLI_ARGS="--terragrunt-log-level debug"

2) Using the TERRAGRUNT_LOG_LEVEL environment variable. Logging levels supported: info (default), panic fatal error warn debug trace

Terragrunt is installed on our . ). This functionality was designed to operate in a very different mode and environment and is strictly outside our scope.If you're not using our runner image, you can .

When working with Terragrunt, you will still specify the Terraform version to be used to process your job. We don't do it for Terragrunt, which is of how it interacts with Terraform versions, especially since we're only using a very stable subset of its API.

We're currently using Terragrunt the same way we're using Terraform, running init, plan, and apply commands. This means we're not supporting (run-all). This functionality was designed to operate in a very different mode and environment, and is strictly outside our scope.

Please refer to the section within our Terraform Debugging Guide for more information on how to set these variables on your Spacelift Stack(s).

For more information on logging with Terragrunt, please refer to the Terragrunt .

🛰️
standard runner image
install Terragrunt separately
way more relaxed in terms
executing Terraform commands on multiple modules at once
Setting Environment Variables
documentation