Skip to content

Commit

Permalink
Autogenerate VPN Tunnel resource (hashicorp#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and nat-henderson committed Jun 29, 2018
1 parent e23c43e commit e7eb2e5
Showing 1 changed file with 101 additions and 39 deletions.
140 changes: 101 additions & 39 deletions docs/r/compute_vpn_tunnel.html.markdown
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
layout: "google"
page_title: "Google: google_compute_vpn_tunnel"
sidebar_current: "docs-google-compute-vpn-tunnel"
description: |-
Manages a VPN Tunnel to the GCE network
VPN tunnel resource.
---

# google\_compute\_vpn\_tunnel

Manages a VPN Tunnel to the GCE network. For more info, read the
[documentation](https://cloud.google.com/compute/docs/vpn).
VPN tunnel resource.

~> **Note:** All arguments including the `shared_secret` will be stored in the raw state as plain-text.
To get more information about VpnTunnel, see:

* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/vpnTunnels)
* How-to Guides
* [Cloud VPN Overview](https://cloud.google.com/vpn/docs/concepts/overview)
* [Networks and Tunnel Routing](https://cloud.google.com/vpn/docs/concepts/choosing-networks-routing)

~> **Warning:** All arguments including the shared secret will be stored in the raw
state as plain-text.
[Read more about sensitive data in state](/docs/state/sensitive-data.html).

## Example Usage
Expand Down Expand Up @@ -93,52 +113,94 @@ resource "google_compute_route" "route1" {

The following arguments are supported:

* `name` - (Required) A unique name for the resource, required by GCE. Changing
this forces a new resource to be created.

* `peer_ip` - (Required) The VPN gateway sitting outside of GCE. Changing this
forces a new resource to be created.
* `name` -
(Required)
Name of the resource. The name must be 1-63 characters long, and
comply with RFC1035. Specifically, the name must be 1-63
characters long and match the regular expression
`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
must be a lowercase letter, and all following characters must
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
gateway and the peer VPN gateway.

* `shared_secret` - (Required) A passphrase shared between the two VPN gateways.
Changing this forces a new resource to be created.

* `target_vpn_gateway` - (Required) A link to the VPN gateway sitting inside
GCE. Changing this forces a new resource to be created.

- - -

* `description` - (Optional) A description of the resource. Changing this forces
a new resource to be created.
* `description` -
(Optional)
An optional description of this resource.
* `router` -
(Optional)
URL of router resource to be used for dynamic routing.
* `ike_version` -
(Optional)
IKE protocol version to use when establishing the VPN tunnel with
peer VPN gateway.
Acceptable IKE versions are 1 or 2. Default version is 2.
* `local_traffic_selector` -
(Optional)
Local traffic selector to use when establishing the VPN tunnel with
peer VPN gateway. The value should be a CIDR formatted string,
for example `192.168.0.0/16`. The ranges should be disjoint.
Only IPv4 is supported.
* `remote_traffic_selector` -
(Optional)
Remote traffic selector to use when establishing the VPN tunnel with
peer VPN gateway. The value should be a CIDR formatted string,
for example `192.168.0.0/16`. The ranges should be disjoint.
Only IPv4 is supported.
* `labels` -
(Optional)
Labels to apply to this VpnTunnel.
* `region` -
(Optional)
The region where the tunnel is located.
* `project` (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.

* `ike_version` - (Optional) Either version 1 or 2. Default is 2. Changing this
forces a new resource to be created.

* `local_traffic_selector` - (Optional) Specifies which CIDR ranges are
announced to the VPN peer. Mandatory if the VPN gateway is attached to a
custom subnetted network. Refer to Google documentation for more
information.
## Attributes Reference

* `remote_traffic_selector` - (Optional) Specifies which CIDR ranges the VPN
tunnel can route to the remote side. Mandatory if the VPN gateway is attached to a
custom subnetted network. Refer to Google documentation for more
information.
In addition to the arguments listed above, the following computed attributes are exported:

* `creation_timestamp` -
Creation timestamp in RFC3339 text format.
* `shared_secret_hash` -
Hash of the shared secret.
* `label_fingerprint` -
The fingerprint used for optimistic locking of this resource. Used
internally during updates.
* `detailed_status` -
Detailed status message for the VPN tunnel.
* `self_link` - The URI of the created resource.

* `router` - (Optional) Name of a Cloud Router in the same region
to be used for dynamic routing. Refer to Google documentation for more
information.

* `project` - (Optional) The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.
## Timeouts

* `region` - (Optional) The region this tunnel should sit in. If not specified,
the project region will be used. Changing this forces a new resource to be
created.
This resource provides the following
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:

## Attributes Reference
- `create` - Default is 4 minutes.
- `update` - Default is 4 minutes.
- `delete` - Default is 4 minutes.

In addition to the arguments listed above, the following computed attributes are
exported:
## Import

* `detailed_status` - Information about the status of the VPN tunnel.
VpnTunnel can be imported using any of these accepted formats:

* `self_link` - The URI of the created resource.
```
$ terraform import google_compute_vpn_tunnel.default projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}
$ terraform import google_compute_vpn_tunnel.default {{project}}/{{region}}/{{name}}
$ terraform import google_compute_vpn_tunnel.default {{name}}
```

0 comments on commit e7eb2e5

Please sign in to comment.