google_edgecontainer_vpn_connection

A VPN connection

To get more information about VpnConnection, see:

Example Usage - Edgecontainer Vpn Connection

resource "google_edgecontainer_cluster" "cluster" {
  name = "default"
  location = "us-central1"

  authorization {
    admin_users {
      username = "admin@hashicorptest.com"
    }
  }

  networking {
    cluster_ipv4_cidr_blocks = ["10.0.0.0/16"]
    services_ipv4_cidr_blocks = ["10.1.0.0/16"]
  }

  fleet {
    project = "projects/${data.google_project.project.number}"
  }
}

resource "google_edgecontainer_node_pool" "node_pool" {
  name = "nodepool-1"
  cluster = google_edgecontainer_cluster.cluster.name
  location = "us-central1"
  node_location = "us-central1-edge-example-edgesite"
  node_count = 3
}

resource "google_edgecontainer_vpn_connection" "default" {
  depends_on = [google_edgecontainer_node_pool.node_pool]
  name = "vpn-connection-1"
  location = "us-central1"
  cluster = "projects/${data.google_project.project.number}/locations/us-east1/clusters/${google_edgecontainer_cluster.cluster.name}"
  vpc = google_compute_network.vpc.name
  enable_high_availability = true

  labels = {
    my_key    = "my_val"
    other_key = "other_val"
  }
}

resource "google_compute_network" "vpc" {
  name = "example-vpc"
}

data "google_project" "project" {}

Argument Reference

The following arguments are supported:


The vpc_project block supports:

Attributes Reference

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

The details block contains:

The cloud_router block contains:

The cloud_vpns block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

VpnConnection can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import VpnConnection using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}"
  to = google_edgecontainer_vpn_connection.default
}

When using the terraform import command, VpnConnection can be imported using one of the formats above. For example:

$ terraform import google_edgecontainer_vpn_connection.default projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}
$ terraform import google_edgecontainer_vpn_connection.default {{project}}/{{location}}/{{name}}
$ terraform import google_edgecontainer_vpn_connection.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.