How to apply nested stacks with stack
blocks?
#4636
Unanswered
romainframe
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I'm trying to use nested
stack
blocks in Terragrunt but getting confused about the proper workflow.When I have a env stack that references another stack (not units directly),
terragrunt stack run apply
from the root doesn't seem to work as expected.Minimal Reproduction
Directory Structure
Env Stack (
infra/prod/terragrunt.stack.hcl
)Application Stack (
infra/stacks/mystack/terragrunt.stack.hcl
)The Issue
When running from the production directory:
cd infra/prod terragrunt stack run apply
I get:
could not find any subfolders with Terragrunt configuration files
Full output
However, terragrunt stack generate works fine and creates the nested structure.
Workaround
The solution that works is navigating to the generated nested stack:
Questions
terragrunt stack run apply
from the root work with nested stacks? Or is navigating to the nested generated directory the expected pattern?Environment
Thanks for any guidance on the best practices for nested stack workflows!
Beta Was this translation helpful? Give feedback.
All reactions