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

terragrunt run-all plan for GCP modules with dependencies defined #2370

Open vasu2809 opened 1 year ago

vasu2809 commented 1 year ago

We have an architecture deployed using terraform and terragrunt with dependencies included to ensure all services run one after the other due to dependencies. Is there a way to use terragrunt run-all plan to get a plan file for all modules without actually deploying any? I understand this feature did not exist a while back, but would like to know if there is a workaround for this as asking customers to deploy everything directly after init doesnt seem like a good advice.

denis256 commented 1 year ago

Hi, was considered to use run-all plan/apply with plan files?

terragrunt run-all plan -out=plan.out
terragrunt run-all apply plan.out

it may not work in case if dependencies between modules and if mock data can't be used

vasu2809 commented 1 year ago

Thanks for getting back, yes thats exactly the issue as there are module dependencies and output of one module is being leveraged in other modules which fails because in actual the dependencies dont exist