Troubleshooting "terragrunt.hcl file not found" error when using run-all in Spacelift
Last updated: September 15, 2025
If you're encountering the error "You attempted to run terragrunt in a folder that does not contain a terragrunt.hcl file" when using Terragrunt's run-all functionality in Spacelift, this typically indicates a configuration issue with your stack settings.
Prerequisites for run-all in Spacelift
To use terragrunt run-all from a top-level or subfolder directory in Spacelift, ensure the following settings are configured:
Terragrunt-native mode is enabled for your stack
Use Run All is turned on in the stack settings
Your working directory points to the appropriate folder (can be a subfolder without its own
terragrunt.hcl)Subfolders under your working directory contain the
terragrunt.hclfiles you want to execute
Common Issue: Runtime Configuration Override
Even with the correct stack settings, you may still encounter the error if your runtime configuration has run_all: false set. This override prevents Spacelift from using the run-all functionality, causing it to look for a terragrunt.hcl file in the working directory instead of scanning subfolders.
To verify this:
Check the runtime configuration of your failed run
Look for
run_all: falsein the configurationIf present, remove this override or set it to
true
How run-all works in Spacelift
When properly configured, Spacelift's Terragrunt-native mode with run-all enabled will:
Start from your configured working directory
Scan that directory and all subfolders for
terragrunt.hclfilesExecute all commands (including
init) with the--allflagRun modules in dependency order automatically
This behavior matches what you would expect when running terragrunt run-all locally from the same directory.
Troubleshooting Tips
If you're still experiencing issues:
Use
--terragrunt-log-level debugto see which directories Terragrunt is scanning (set this using theTF_CLI_ARGSenvironment variable:TF_CLI_ARGS="--terragrunt-log-level debug")Verify your directory structure contains the expected
terragrunt.hclfiles in subfoldersDouble-check that no runtime configuration overrides are preventing run-all from being used
For more detailed information about Terragrunt run-all in Spacelift, see the official documentation.