Terragrunt "terragrunt: command not found" in CI
The shell could not find a terragrunt executable on PATH. GitHub-hosted runners ship Terraform but not Terragrunt, so you must install the binary (or use gruntwork-io/terragrunt-action) before any terragrunt step runs.
What this error means
A step calling terragrunt plan or terragrunt run-all apply exits 127 with "terragrunt: command not found", even though terraform version works.
/home/runner/work/_temp/script.sh: line 1: terragrunt: command not found
Error: Process completed with exit code 127.Common causes
Terragrunt is not preinstalled on the runner
GitHub-hosted images include terraform but not terragrunt. A bare terragrunt call finds nothing on PATH.
The install step was skipped or downloaded to a directory not on PATH
A curl-based install that writes to a folder not exported into $GITHUB_PATH leaves the binary unreachable in later steps.
How to fix it
Install Terragrunt before using it
- Add a setup step that downloads the terragrunt release binary.
- Move it onto PATH (for example /usr/local/bin).
- Confirm with
terragrunt --versionbefore the plan step.
- name: Install Terragrunt
run: |
curl -sL -o /usr/local/bin/terragrunt \
https://github.com/gruntwork-io/terragrunt/releases/download/v0.55.1/terragrunt_linux_amd64
chmod +x /usr/local/bin/terragrunt
terragrunt --versionUse the official Terragrunt action
The gruntwork-io/terragrunt-action installs both Terraform and Terragrunt and runs the command for you.
- uses: gruntwork-io/terragrunt-action@v2
with:
tofu_version: 1.7.0
tg_version: 0.55.1
tg_command: 'run-all plan'How to prevent it
- Pin an explicit Terragrunt version so installs are reproducible.
- Install Terragrunt and Terraform/OpenTofu in the same setup job.
- Verify
terragrunt --versionearly so a missing binary fails fast.