Closed piotr-rzepa closed 1 year ago
/validate paths="modules/subnet_set examples/combined_design"
Testing job ID: 6322173926 Job result: FAILURE
/validate paths="modules/subnet_set examples/combined_design"
Testing job ID: 6378065345 Job result: SUCCESS
Description
The change sets the default value for the nacl_associations variable from
null
to{}
(an empty map).Motivation and Context
Currently, the default null value causes Terraform's plan to fail in case no value for the variable is provided - the module (
aws_network_acl_association
resource) expectsnacl_associations
to be iterable (a map of strings), but when the user does not intend to associate any network ACLs with any subnet and skips the variable altogether, it throws anInvalid for_each argument
error. The user has to explicitly set anacl_associations
variable to an empty map to avoid errors. By changing the default value from null to an empty map, the resource creation is skipped without any required workarounds from users.How Has This Been Tested?
The subnet_sets module was deployed without setting any explicit value for
nacl_associations
variable. The plan and apply did not report any errors when the default value was set to an empty map.Screenshots (if appropriate)
Error related to the
nacl_associations
beingnull
:Types of changes
Checklist