Google Compute Engine External VPN Gateway

This page shows how to write Terraform for Compute Engine External VPN Gateway and write them securely.

google_compute_external_vpn_gateway (Terraform)

The External VPN Gateway in Compute Engine can be configured in Terraform with the resource name google_compute_external_vpn_gateway. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

compute_external_vpn_gateway_test.tf#L6
resource "google_compute_external_vpn_gateway" "my_compute_external_vpn_gateway" {
  name            = "my_compute_external_vpn_gateway"
  redundancy_type = "SINGLE_IP_INTERNALLY_REDUNDANT"
  description     = "An externally managed VPN gateway"
  interface {
    id         = 0
compute_external_vpn_gateway_test.tf#L6
resource "google_compute_external_vpn_gateway" "my_compute_external_vpn_gateway" {
  name            = "my_compute_external_vpn_gateway"
  redundancy_type = "SINGLE_IP_INTERNALLY_REDUNDANT"
  description     = "An externally managed VPN gateway"
  interface {
    id         = 0

Parameters

  • description optional - string
    • An optional description of this resource.

  • id optionalcomputed - string
  • name required - string
    • Name of the resource. Provided by the client when the resource is created. 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?' 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.

  • project optionalcomputed - string
  • redundancy_type optional - string
    • Indicates the redundancy type of this external VPN gateway Possible values: ["FOUR_IPS_REDUNDANCY", "SINGLE_IP_INTERNALLY_REDUNDANT", "TWO_IPS_REDUNDANCY"]

  • self_link requiredcomputed - string

Explanation in Terraform Registry

Represents a VPN gateway managed outside of GCP. To get more information about ExternalVpnGateway, see:

Frequently asked questions

What is Google Compute Engine External VPN Gateway?

Google Compute Engine External VPN Gateway is a resource for Compute Engine of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Compute Engine External VPN Gateway?

For Terraform, the gilyas/infracost and infracost/infracost source code examples are useful. See the Terraform Example section for further details.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.