gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8.01k stars 971 forks source link

plan-all output file contains plan for only a single module #870

Open mircea-c opened 5 years ago

mircea-c commented 5 years ago

Hi :wave: Apologies if this is a duplicate issue.

Running terragrunt plan-all -out=/tmp/output.plan in a structure like the following:

root
├── module-1
│   └── main.tf
├── module-2
│   └── main.tf
├── module-3
    └── main.tf

The output.plan file only contains the plan for one of the modules at the end of execution.

Looking at the terragrunt output this makes sense as it's running terraform plan -out=/tmp/output.plan in each module thus overwriting the plan file each time.

Possibly an easy fix to append a prefix/suffix to the output file name during execution. Will try to contribute a PR when I can.

brikis98 commented 5 years ago

Using -out with an absolute path definitely won't work, as all of the plan commands will write to the same file. Using a relative path might work...