Skip to content

Commit

Permalink
Support IPV6 for HA VPN. (GoogleCloudPlatform#7525)
Browse files Browse the repository at this point in the history
  • Loading branch information
600lyy authored Mar 29, 2023
1 parent 5f31124 commit 1c4f44e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mmv1/products/compute/VpnGateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ examples:
vars:
ha_vpn_gateway1_name: "ha-vpn-1"
network1_name: "network1"
- !ruby/object:Provider::Terraform::Examples
name: "ha_vpn_gateway_ipv6"
primary_resource_id: "ha_gateway1"
vars:
ha_vpn_gateway1_name: "ha-vpn-1"
network1_name: "network1"
- !ruby/object:Provider::Terraform::Examples
name: "ha_vpn_gateway_gcp_to_gcp"
primary_resource_id: "ha_gateway1"
Expand Down Expand Up @@ -126,6 +132,16 @@ properties:
The network this VPN gateway is accepting traffic for.
required: true
immutable: true
- !ruby/object:Api::Type::Enum
name: 'stackType'
description: |
The stack type for this VPN gateway to identify the IP protocols that are enbaled.
If not specified, IPV4_ONLY will be used.
default_value: :IPV4_ONLY
values:
- :IPV4_ONLY
- :IPV4_IPV6
immutable: true
- !ruby/object:Api::Type::Array
name: 'vpnInterfaces'
description: |
Expand Down
11 changes: 11 additions & 0 deletions mmv1/templates/terraform/examples/ha_vpn_gateway_ipv6.tf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "google_compute_ha_vpn_gateway" "ha_gateway1" {
region = "us-central1"
name = "<%= ctx[:vars]['ha_vpn_gateway1_name'] %>"
network = google_compute_network.network1.id
stack_type = "IPV4_IPV6"
}

resource "google_compute_network" "network1" {
name = "<%= ctx[:vars]['network1_name'] %>"
auto_create_subnetworks = false
}

0 comments on commit 1c4f44e

Please sign in to comment.