Closed alsidneio closed 2 years ago
Hello,
Thanks for your contribution, I've done that version just before seeing your PR : https://github.com/Guimove/terraform-aws-bastion/pull/133
Yours's better because it avoid any risk of null value, mine suppose that their is a default value for the var.ipv6_cidrs
Do you mind to do the same rework for ipv4 ? Just to get the same way to manage both type of cidr
Thanks
LGTM !!!! 🚀
Description
Commit https://github.com/Guimove/terraform-aws-bastion/commit/df6830573f2832e9a50e419c8284c133fda19463 added the
ipv6_cidr_blocks
argument to theaws_security_group_rule
ingress resource on line 39 of main.tf https://github.com/Guimove/terraform-aws-bastion/blob/e6332cdd7daf1b7fa004e248b58b07c7727660f7/main.tf#L39This addition creates an error if the subnets do not have ipv6 addresses resulting in similar to the following error:
Changes Made
ipv6_cidr_block
parameter to the locals.tf file so that a list of empty strings will set theipv6_cidr_blocks
argument to null. The null value tells terraform to omit the optional argument.