You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As per title, when using dependency and dependencies block external dependencies are not applied in order but rather in a random order - first-come first serve I suspect
To Reproduce
Have a terragrunt module that calls two other modules as dependencies:
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/account-context
Should Terragrunt apply the external dependency? (y/n) ^C
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/account-context
Should Terragrunt apply the external dependency? (y/n) ^C
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/account-context
Should Terragrunt apply the external dependency? (y/n) ^C
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/kms
Should Terragrunt apply the external dependency? (y/n) ^C
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/kms
Should Terragrunt apply the external dependency? (y/n) ^C
# M1: ~/Documents/git/terragrunt-config/aws/services/keyspaces
ζ terragrunt run-all apply
Module: ~/Documents/git/terragrunt-config/aws/services/keyspaces
External dependency: ~/Documents/git/terragrunt-config/aws/services/account-context
Should Terragrunt apply the external dependency? (y/n) ^C
As shown above in the multiple run attempts, the order in terragrunt.hcl file dependencies block is not honoured: we get an inconsistent behaviour on each run
Expected behavior
Dependencies block order in the dependencies path attribute array to be honoured.
It isn't very clear to be fair what the example in the docs is trying to say with:
# When applying this terragrunt config in an `run-all` command, make sure the modules at "../vpc" and "../rds" are
# handled first.
dependencies {
paths = ["../vpc", "../rds"]
}
But I can only assume that the purpose is to determine the order for terragrunt to apply the dependencies: as per the docs :
the dependencies block (...) is purely for ordering the operations
Otherwise the dependencies block would be pretty useless - unless I am missing something.
Nice to have
Terminal output
Screenshots
Versions
Terragrunt version: terragrunt version 0.54.22
Terraform version: Terraform v1.5.6
Environment details (Ubuntu 20.04, Windows 10, etc.): darwin_arm64 Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Update:
After creating a graph as described here
I could see that the services would be deployed in the correct order - based on the graph output, which I believe is the ultimate source of truth here and the cli output just happens to be not accurate.
Describe the bug
As per title, when using dependency and dependencies block external dependencies are not applied in order but rather in a random order - first-come first serve I suspect
To Reproduce
Have a terragrunt module that calls two other modules as dependencies:
Terminal output:
As shown above in the multiple run attempts, the order in terragrunt.hcl file dependencies block is not honoured: we get an inconsistent behaviour on each run
Expected behavior
Dependencies block order in the dependencies path attribute array to be honoured.
It isn't very clear to be fair what the example in the docs is trying to say with:
But I can only assume that the purpose is to determine the order for terragrunt to apply the dependencies: as per the docs :
Otherwise the dependencies block would be pretty useless - unless I am missing something.
Nice to have
Versions
terragrunt version 0.54.22
Terraform v1.5.6
darwin_arm64
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: