Skip to content

Commit

Permalink
Merge pull request #3640 from modular-magician/codegen-pr-1760
Browse files Browse the repository at this point in the history
Creating resource for modern/HA vpn gateway in terraform
  • Loading branch information
slevenick authored May 23, 2019
2 parents 9837f91 + 6de3426 commit 31b61b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
25 changes: 13 additions & 12 deletions google/resource_compute_vpn_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,12 @@ func resourceComputeVpnTunnel() *schema.Resource {
Required: true,
ForceNew: true,
},
"peer_ip": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validatePeerAddr,
},
"shared_secret": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Sensitive: true,
},
"target_vpn_gateway": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"description": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -189,6 +177,13 @@ func resourceComputeVpnTunnel() *schema.Resource {
},
Set: schema.HashString,
},
"peer_ip": {
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
ValidateFunc: validatePeerAddr,
},
"region": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -212,6 +207,12 @@ func resourceComputeVpnTunnel() *schema.Resource {
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"target_vpn_gateway": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"creation_timestamp": {
Type: schema.TypeString,
Computed: true,
Expand Down
18 changes: 9 additions & 9 deletions website/docs/r/compute_vpn_tunnel.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@ The following arguments are supported:
be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.

* `target_vpn_gateway` -
(Required)
URL of the Target VPN gateway with which this VPN tunnel is
associated.

* `peer_ip` -
(Required)
IP address of the peer VPN gateway. Only IPv4 is supported.

* `shared_secret` -
(Required)
Shared secret used to set the secure session between the Cloud VPN
Expand All @@ -226,10 +217,19 @@ The following arguments are supported:
(Optional)
An optional description of this resource.

* `target_vpn_gateway` -
(Optional)
URL of the Target VPN gateway with which this VPN tunnel is
associated.

* `router` -
(Optional)
URL of router resource to be used for dynamic routing.

* `peer_ip` -
(Optional)
IP address of the peer VPN gateway. Only IPv4 is supported.

* `ike_version` -
(Optional)
IKE protocol version to use when establishing the VPN tunnel with
Expand Down

0 comments on commit 31b61b7

Please sign in to comment.