-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
exclude {
if = true
actions = ["all"]
exclude_dependencies = true # <- ⚠️ This also ignores dependencies, shared with other units in the queue
}Reproducing bugs
-
Run
terragrunt run-all plan -
Produces following groups due to dependencies between units:
Group 1:
apple
watermelon
Group 2:
cucumber (depends on apple)
Group 3:
potato (depends on apple and cucumber)
tomato (depends on apple and cucumber)
peach (depends on apple and cucumber)
banana (depends on apple, watermelon and cucumber)
- Now lets say I add exclude block to
bananaunit as follows:
exclude {
if = true
actions = ["all"]
exclude_dependencies = true
}- Now when I run
terragrunt run-all planI see following result:
Group 1:
potato
tomato
peach
exclude_dependencies = true in the exclude block of the banana unit, effectively excluding same dependencies (apple, cucumber) that are shared by sibling units (potato, tomato, peach).
Expected behavior
Group 1:
apple
Group 2:
cucumber (depends on apple)
Group 3:
potato (depends on apple and cucumber)
tomato (depends on apple and cucumber)
peach (depends on apple and cucumber)
I would expect that other units in queue that share same dependencies with banana, would still have their dependencies included despite exclude_dependencies = true being specified in banana unit.
I would expect exclude_dependencies = true to apply to only those dependencies that are exclusive to that particular unit (in this case only watermelon is an exclusive dependency of banana).
Versions
terragrunt version v0.73.14
terraform version 1.5.7