Open yorinasub17 opened 3 years ago
I just ran across this ticket while investigating long startup times for terragrunt. If I understand correctly, the two would provide the same functional and performance impact:
dependencies {
paths = ["../vpc", "../mysql", "../redis"]
}
dependency {
for_each = ["../vpc", "../mysql", "../redis"]
config_path = each.value
skip_outputs = true
}
With the introduction of
dependency
blocks, the functionality ofdependencies
is less useful as it is an implicit list of configurations. To avoid confusion, we should deprecate and remove thedependencies
block.Before removing however, there is one use case for
dependencies
block where it allows a concise representation of multiple dependencies. We should consider replacing thedependencies
block by adding support forfor_each
todependency
blocks. E.g.:Motivation
Currently, we use the old
dependencies
block for theconfigstack
graph representation. This was done to speed up development of thedependency
blocks, but has led to a few headaches, the latest one being https://github.com/gruntwork-io/terragrunt/issues/1852. We should take this opportunity to remove thedependencies
block and consolidate the dependency handling logic around the internal representation ofdependency
blocks.