Terragrunt "Could not find terragrunt.hcl" in CI
Terragrunt walks up from the working directory looking for a terragrunt.hcl (or terragrunt.hcl.json) and found none. In CI this is almost always a wrong working-directory or a checkout that did not include the module folder.
What this error means
terragrunt fails with "Could not find terragrunt.hcl or terragrunt.hcl.json in the current directory" or "Error finding terragrunt config", before any Terraform runs.
ERRO[0000] Error finding terragrunt config: Could not find terragrunt.hcl or
terragrunt.hcl.json in the current directory (/home/runner/work/infra/infra) or any
of its parents. Make sure you run terragrunt from a directory that contains a config.Common causes
The step runs from the wrong directory
The job did not cd into the environment folder (for example live/prod/vpc), so the directory Terragrunt inspects has no config.
The config folder was not checked out
A sparse checkout or a submodule that was not initialized leaves the terragrunt.hcl absent on the runner.
How to fix it
Run from the directory that holds terragrunt.hcl
- Confirm where your terragrunt.hcl lives in the repo tree.
- Set
working-directoryon the step, or use--terragrunt-working-dir. - Re-run so Terragrunt starts inside the config folder.
- name: Plan
working-directory: live/prod/vpc
run: terragrunt planPoint Terragrunt at the config explicitly
Use the working-dir flag when you cannot change the step directory.
terragrunt plan --terragrunt-working-dir live/prod/vpcHow to prevent it
- Set
working-directoryexplicitly on every Terragrunt step. - Use a full checkout so all environment folders are present.
- Keep a consistent live/ directory layout so paths are predictable.