terragrunt
terragrunt copied to clipboard
dependency init check and auto-init check are different
Describe the bug
The way terragrunt determines if it needs to run auto-init and how the dependency code determines if a stack has already been init-ed are different mechanisms. The latter only does a very naive check for .terraform
existence.
Expected behavior The dependency init check to match the auto-init check.
Versions
- Terragrunt version: v0.52.3
- Terraform version: 1.5.7
- Environment details (Ubuntu 20.04, Windows 10, etc.): Ubuntu 22.04
Additional context
We cache .terraform/modules
for CI/CD since downloading modules can be quite unreliable. However, if we try filter what stacks are run, we have the issue where terragrunt tries to use terraform output -json
for dependent stacks that aren't auto-init'd (even with FetchDependencyOutputFromState
enabled.)