Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ula internal ipv6 support in compute_network and subnetwork #6105

Merged
merged 5 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions mmv1/products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8055,6 +8055,21 @@ objects:
Maximum Transmission Unit in bytes. The minimum value for this field is 1460
and the maximum value is 1500 bytes.
input: true
- !ruby/object:Api::Type::Boolean
name: 'enableUlaInternalIpv6'
description: |
Enable ULA internal ipv6 on this network. Enabling this feature will assign
a /48 from google defined ULA prefix fd20::/20.
input: true
- !ruby/object:Api::Type::String
name: 'internalIpv6Range'
gankushjain marked this conversation as resolved.
Show resolved Hide resolved
description: |
When enabling ula internal ipv6, caller optionally can specify the /48 range
they want from the google defined ULA prefix fd20::/20. The input must be a
valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
fail if the speficied /48 is already in used by another resource.
If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
input: true
- !ruby/object:Api::Resource
name: 'NetworkEndpoint'
kind: 'compute#networkEndpoint'
Expand Down Expand Up @@ -14961,6 +14976,7 @@ objects:
name: 'ipv6AccessType'
values:
- :EXTERNAL
- :INTERNAL
description: |
The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation
or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
Expand Down
8 changes: 8 additions & 0 deletions mmv1/products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
default_from_api: true
mtu: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
internalIpv6Range: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
post_create: templates/terraform/post_create/compute_network_delete_default_route.erb
NetworkEndpoint: !ruby/object:Overrides::Terraform::ResourceOverride
Expand Down Expand Up @@ -2927,6 +2929,12 @@ overrides: !ruby/object:Overrides::ResourceOverrides
vars:
subnetwork_name: "ipv6-test-subnetwork"
network_name: "ipv6-test-network"
- !ruby/object:Provider::Terraform::Examples
name: "subnetwork_internal_ipv6"
primary_resource_id: "subnetwork-internal-ipv6"
vars:
subnetwork_name: "internal-ipv6-test-subnetwork"
network_name: "internal-ipv6-test-network"
TargetHttpProxy: !ruby/object:Overrides::Terraform::ResourceOverride
examples:
- !ruby/object:Provider::Terraform::Examples
Expand Down
17 changes: 17 additions & 0 deletions mmv1/templates/terraform/examples/subnetwork_internal_ipv6.tf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "google_compute_subnetwork" "subnetwork-internal-ipv6" {
name = "<%= ctx[:vars]['subnetwork_name'] %>"

ip_cidr_range = "10.0.0.0/22"
region = "us-west2"

stack_type = "IPV4_IPV6"
ipv6_access_type = "INTERNAL"

network = google_compute_network.custom-test.id
}

resource "google_compute_network" "custom-test" {
name = "<%= ctx[:vars]['network_name'] %>"
auto_create_subnetworks = false
enable_ula_internal_ipv6 = true
}