terraform-google-lb-http
terraform-google-lb-http copied to clipboard
enable_ipv6 without create_ipv6_address or ipv6_address creates ipv4 frontends
TL;DR
When setting enable_ipv6
without create_ipv6_address
or ipv6_address
, frontends are still made with ephemereal IPV4 addresses.
Expected behavior
I was expecting create_ipv6_address
to be enabled by default when enabling ipv6. If not desired, then this case should be treated as an error.
Observed behavior
Two frontends labeled name-ipv6-http(s)
with IPV4 addresses
Terraform Configuration
Obvious from description
Terraform Version
1.5.7
Additional information
The issue is local.ipv6_address
is undefined in this case as both vars aren't set
https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/main.tf#L20
When used below in the forwarding rules, it is passed as undefined, which causes global_fowarding_rule
to allocate an ephemereal IPV4 address
https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/main.tf#L75