Describe the bug
When overriding dependency blocks with an autoinclude, an error will throw if config_path was originally set to an attribute of values which is no longer set due to being unused in the new dependency.
Reproducing bugs
The following sort of structure with a source dependency set to an attribute of values causes an "Unsupported attribute" error to throw when the unit source file is parsed.
# units/transit-gateway-vpc-attachment/terragrunt.hcl
# ... omitted for brevity
dependency "vpc" {
config_path = values.vpc_path # should be overridden by autoinclude but access is attempted when undefined
mock_outputs = {
vpc_id = "mock-vpc-id"
}
}
# ... omitted for brevity
# stacks/prod/terragrunt.stack.hcl
# ... omitted for brevity
unit "transit_gateway_vpc_attachment" {
source = "../../../units/aws/transit-gateway-vpc-attachment"
path = "transit-gateway-vpc-attachment"
autoinclude {
dependency "vpc" {
config_path = stack.mgmt_infra.path # no longer set to values.vpc_path
mock_outputs = {
vpc = {
vpc_id = "mock-vpc-id"
}
}
}
inputs = {
vpc_id = dependency.mgmt_infra.outputs.vpc.vpc_id
azs = dependency.mgmt_infra.outputs.vpc.azs
}
}
values = {
// Required inputs
name = local.name
// Dependency paths
# no longer setting "vpc_path" in values due to the autoinclude overriding it
transit_gateway_path = unit.transit_gateway.path
}
# ... omitted for brevity
Expected behavior
The config_path parameter should be overridden without attempting to access the unused attribute of values.
Must haves
Nice to haves
Versions
- Terragrunt version: v1.1.3
- Terraform version: v1.15.8
- Environment details (Ubuntu 20.04, Windows 10, etc.): Fedora 44
Describe the bug
When overriding dependency blocks with an
autoinclude, an error will throw ifconfig_pathwas originally set to an attribute ofvalueswhich is no longer set due to being unused in the new dependency.Reproducing bugs
The following sort of structure with a source dependency set to an attribute of
valuescauses an "Unsupported attribute" error to throw when the unit source file is parsed.Expected behavior
The
config_pathparameter should be overridden without attempting to access the unused attribute ofvalues.Must haves
Nice to haves
Versions