Closed rafaljanicki closed 2 years ago
Hmmm so since var.create_security_group = false
and var.use_existing_security_groups == null
, then local.create_security_group
is false meaning that module.aws_security_group
is disabled and so this results in the following expression
security_group_ids = concat(local.associated_security_group_ids, [null])
The issue would probably be resolved if we added compact
security_group_ids = compact(concat(local.associated_security_group_ids, [module.aws_security_group.id]))
cc: @Nuru would this be the appropriate fix for this ?
The issue would probably be resolved if we added
compact
security_group_ids = compact(concat(local.associated_security_group_ids, [module.aws_security_group.id]))
cc: @Nuru would this be the appropriate fix for this ?
Cannot use compact()
. See #121
Describe the Bug
When using the module with associated_security_group_ids and disabled creation of security group, it throws an error about a null value:
Expected Behavior
Should work correctly and add only the associated security groups
Steps to Reproduce