github gruntwork-io/terragrunt v0.35.0

latest releases: v0.67.14, v0.67.13, v0.67.12...
2 years ago

Updated CLI args, config attributes and blocks

  • dependencies [BACKWARD INCOMPATIBLE]
  • dependency
  • include

Description

  • Fixed bug where Terragrunt only took the last include block into consideration for the dependency run graph. Now all dependency blocks defined across all include configurations will be taken into consideration.

Migration guide

As a part of this change, the behavior of how dependencies blocks are merged together in the shallow merge strategy has been updated to be a deep merge - now all the paths defined in dependencies blocks across the included modules are always concatenated together rather than replaced. If you have a configuration that depended on the old behavior, you will need to update your configuration to take advantage of multiple include blocks to selectively include the parent dependencies block.

E.g., if you had the following configurations:

parent terragrunt.hcl

dependencies {
  paths = ["../vpc", "../mysql"]
}

# ... other blocks ...

child terragrunt.hcl

include "root" {
  path = find_in_parent_folders()
}

dependencies {
  paths = ["../new_vpc"] # intended to replace dependencies block in parent
}

# ... other blocks ...

You will want to update to the following:

parent terragrunt.hcl

# ... other blocks ...

dependencies parent terragrunt.hcl

dependencies {
  paths = ["../vpc", "../mysql"]
}

child terragrunt.hcl

include "root" {
  path = find_in_parent_folders()
}

dependencies {
  paths = ["../new_vpc"] # intended to replace dependencies block in parent
}

# ... other blocks ...

child who wants dependencies

include "root" {
  path = find_in_parent_folders()
}

include "dependencies" {
  path = find_in_parent_folders("dependencies_parent_terragrunt.hcl")
}

# ... other blocks ...

Related links

Don't miss a new terragrunt release

NewReleases is sending notifications on new releases.