terraform-google-modules / terraform-google-network

Sets up a new VPC network on Google Cloud
https://registry.terraform.io/modules/terraform-google-modules/network/google
Apache License 2.0
410 stars 1.23k forks source link

Output for IPv6 ranges #550

Open mohag opened 5 months ago

mohag commented 5 months ago

TL;DR

There is no output for the IPv6 ranges on the subnets. (I'm looking for the ipv6_cidr_range attribute from the google_compute_subnetwork resource) (IPv6 version of the subnets_ips output)

A similar option for internal_ipv6_prefix might be useful as well, but that can be retrieved using the data source. (AFAIK, only one of the two would be present on a single subnet, it might be an option to include whichever one is possible (if any) in the same output)

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_subnetwork#attributes-reference

Detailed design

Add an output `subnets_ipv6s` that outputs `external_ipv6_prefix` for all the subnets (simple copy of `subnets_ips`, with the source attribute changed).

Also add `subnets_internal_ipv6_prefixes` based on `internal_ipv6_prefix` in a similar way.

Additional information

While writing this, I also realised that the subnets output can probably be used to retrieve this info. IPv6 should not be harder to use than IPv4 though.

imrannayer commented 5 months ago

@mohag can u get these values from subnets. It has all the subnet attributes?

mohag commented 5 months ago

@mohag can u get these values from subnets. It has all the subnet attributes?

Correct, that is what I eventually did, see the note in "Additional Information". (So what is left is mainly a request to treat IPv6 and IPv4 the same)

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days