gcp.edgecontainer.VpnConnection
Explore with Pulumi AI
A VPN connection
To get more information about VpnConnection, see:
- API documentation
- How-to Guides
Example Usage
Edgecontainer Vpn Connection
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const cluster = new gcp.edgecontainer.Cluster("cluster", {
    name: "default",
    location: "us-central1",
    authorization: {
        adminUsers: {
            username: "admin@hashicorptest.com",
        },
    },
    networking: {
        clusterIpv4CidrBlocks: ["10.0.0.0/16"],
        servicesIpv4CidrBlocks: ["10.1.0.0/16"],
    },
    fleet: {
        project: project.then(project => `projects/${project.number}`),
    },
});
const nodePool = new gcp.edgecontainer.NodePool("node_pool", {
    name: "nodepool-1",
    cluster: cluster.name,
    location: "us-central1",
    nodeLocation: "us-central1-edge-example-edgesite",
    nodeCount: 3,
});
const vpc = new gcp.compute.Network("vpc", {name: "example-vpc"});
const _default = new gcp.edgecontainer.VpnConnection("default", {
    name: "vpn-connection-1",
    location: "us-central1",
    cluster: pulumi.all([project, cluster.name]).apply(([project, name]) => `projects/${project.number}/locations/us-east1/clusters/${name}`),
    vpc: vpc.name,
    enableHighAvailability: true,
    labels: {
        my_key: "my_val",
        other_key: "other_val",
    },
}, {
    dependsOn: [nodePool],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
cluster = gcp.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": f"projects/{project.number}",
    })
node_pool = gcp.edgecontainer.NodePool("node_pool",
    name="nodepool-1",
    cluster=cluster.name,
    location="us-central1",
    node_location="us-central1-edge-example-edgesite",
    node_count=3)
vpc = gcp.compute.Network("vpc", name="example-vpc")
default = gcp.edgecontainer.VpnConnection("default",
    name="vpn-connection-1",
    location="us-central1",
    cluster=cluster.name.apply(lambda name: f"projects/{project.number}/locations/us-east1/clusters/{name}"),
    vpc=vpc.name,
    enable_high_availability=True,
    labels={
        "my_key": "my_val",
        "other_key": "other_val",
    },
    opts = pulumi.ResourceOptions(depends_on=[node_pool]))
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/edgecontainer"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		cluster, err := edgecontainer.NewCluster(ctx, "cluster", &edgecontainer.ClusterArgs{
			Name:     pulumi.String("default"),
			Location: pulumi.String("us-central1"),
			Authorization: &edgecontainer.ClusterAuthorizationArgs{
				AdminUsers: &edgecontainer.ClusterAuthorizationAdminUsersArgs{
					Username: pulumi.String("admin@hashicorptest.com"),
				},
			},
			Networking: &edgecontainer.ClusterNetworkingArgs{
				ClusterIpv4CidrBlocks: pulumi.StringArray{
					pulumi.String("10.0.0.0/16"),
				},
				ServicesIpv4CidrBlocks: pulumi.StringArray{
					pulumi.String("10.1.0.0/16"),
				},
			},
			Fleet: &edgecontainer.ClusterFleetArgs{
				Project: pulumi.Sprintf("projects/%v", project.Number),
			},
		})
		if err != nil {
			return err
		}
		nodePool, err := edgecontainer.NewNodePool(ctx, "node_pool", &edgecontainer.NodePoolArgs{
			Name:         pulumi.String("nodepool-1"),
			Cluster:      cluster.Name,
			Location:     pulumi.String("us-central1"),
			NodeLocation: pulumi.String("us-central1-edge-example-edgesite"),
			NodeCount:    pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		vpc, err := compute.NewNetwork(ctx, "vpc", &compute.NetworkArgs{
			Name: pulumi.String("example-vpc"),
		})
		if err != nil {
			return err
		}
		_, err = edgecontainer.NewVpnConnection(ctx, "default", &edgecontainer.VpnConnectionArgs{
			Name:     pulumi.String("vpn-connection-1"),
			Location: pulumi.String("us-central1"),
			Cluster: cluster.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("projects/%v/locations/us-east1/clusters/%v", project.Number, name), nil
			}).(pulumi.StringOutput),
			Vpc:                    vpc.Name,
			EnableHighAvailability: pulumi.Bool(true),
			Labels: pulumi.StringMap{
				"my_key":    pulumi.String("my_val"),
				"other_key": pulumi.String("other_val"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			nodePool,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var project = Gcp.Organizations.GetProject.Invoke();
    var cluster = new Gcp.EdgeContainer.Cluster("cluster", new()
    {
        Name = "default",
        Location = "us-central1",
        Authorization = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationArgs
        {
            AdminUsers = new Gcp.EdgeContainer.Inputs.ClusterAuthorizationAdminUsersArgs
            {
                Username = "admin@hashicorptest.com",
            },
        },
        Networking = new Gcp.EdgeContainer.Inputs.ClusterNetworkingArgs
        {
            ClusterIpv4CidrBlocks = new[]
            {
                "10.0.0.0/16",
            },
            ServicesIpv4CidrBlocks = new[]
            {
                "10.1.0.0/16",
            },
        },
        Fleet = new Gcp.EdgeContainer.Inputs.ClusterFleetArgs
        {
            Project = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}",
        },
    });
    var nodePool = new Gcp.EdgeContainer.NodePool("node_pool", new()
    {
        Name = "nodepool-1",
        Cluster = cluster.Name,
        Location = "us-central1",
        NodeLocation = "us-central1-edge-example-edgesite",
        NodeCount = 3,
    });
    var vpc = new Gcp.Compute.Network("vpc", new()
    {
        Name = "example-vpc",
    });
    var @default = new Gcp.EdgeContainer.VpnConnection("default", new()
    {
        Name = "vpn-connection-1",
        Location = "us-central1",
        Cluster = Output.Tuple(project, cluster.Name).Apply(values =>
        {
            var project = values.Item1;
            var name = values.Item2;
            return $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/us-east1/clusters/{name}";
        }),
        Vpc = vpc.Name,
        EnableHighAvailability = true,
        Labels = 
        {
            { "my_key", "my_val" },
            { "other_key", "other_val" },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            nodePool,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.edgecontainer.Cluster;
import com.pulumi.gcp.edgecontainer.ClusterArgs;
import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationArgs;
import com.pulumi.gcp.edgecontainer.inputs.ClusterAuthorizationAdminUsersArgs;
import com.pulumi.gcp.edgecontainer.inputs.ClusterNetworkingArgs;
import com.pulumi.gcp.edgecontainer.inputs.ClusterFleetArgs;
import com.pulumi.gcp.edgecontainer.NodePool;
import com.pulumi.gcp.edgecontainer.NodePoolArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.edgecontainer.VpnConnection;
import com.pulumi.gcp.edgecontainer.VpnConnectionArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var project = OrganizationsFunctions.getProject();
        var cluster = new Cluster("cluster", ClusterArgs.builder()
            .name("default")
            .location("us-central1")
            .authorization(ClusterAuthorizationArgs.builder()
                .adminUsers(ClusterAuthorizationAdminUsersArgs.builder()
                    .username("admin@hashicorptest.com")
                    .build())
                .build())
            .networking(ClusterNetworkingArgs.builder()
                .clusterIpv4CidrBlocks("10.0.0.0/16")
                .servicesIpv4CidrBlocks("10.1.0.0/16")
                .build())
            .fleet(ClusterFleetArgs.builder()
                .project(String.format("projects/%s", project.applyValue(getProjectResult -> getProjectResult.number())))
                .build())
            .build());
        var nodePool = new NodePool("nodePool", NodePoolArgs.builder()
            .name("nodepool-1")
            .cluster(cluster.name())
            .location("us-central1")
            .nodeLocation("us-central1-edge-example-edgesite")
            .nodeCount(3)
            .build());
        var vpc = new Network("vpc", NetworkArgs.builder()
            .name("example-vpc")
            .build());
        var default_ = new VpnConnection("default", VpnConnectionArgs.builder()
            .name("vpn-connection-1")
            .location("us-central1")
            .cluster(cluster.name().applyValue(name -> String.format("projects/%s/locations/us-east1/clusters/%s", project.applyValue(getProjectResult -> getProjectResult.number()),name)))
            .vpc(vpc.name())
            .enableHighAvailability(true)
            .labels(Map.ofEntries(
                Map.entry("my_key", "my_val"),
                Map.entry("other_key", "other_val")
            ))
            .build(), CustomResourceOptions.builder()
                .dependsOn(nodePool)
                .build());
    }
}
resources:
  cluster:
    type: gcp:edgecontainer:Cluster
    properties:
      name: default
      location: us-central1
      authorization:
        adminUsers:
          username: admin@hashicorptest.com
      networking:
        clusterIpv4CidrBlocks:
          - 10.0.0.0/16
        servicesIpv4CidrBlocks:
          - 10.1.0.0/16
      fleet:
        project: projects/${project.number}
  nodePool:
    type: gcp:edgecontainer:NodePool
    name: node_pool
    properties:
      name: nodepool-1
      cluster: ${cluster.name}
      location: us-central1
      nodeLocation: us-central1-edge-example-edgesite
      nodeCount: 3
  default:
    type: gcp:edgecontainer:VpnConnection
    properties:
      name: vpn-connection-1
      location: us-central1
      cluster: projects/${project.number}/locations/us-east1/clusters/${cluster.name}
      vpc: ${vpc.name}
      enableHighAvailability: true
      labels:
        my_key: my_val
        other_key: other_val
    options:
      dependsOn:
        - ${nodePool}
  vpc:
    type: gcp:compute:Network
    properties:
      name: example-vpc
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Create VpnConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnConnection(name: string, args: VpnConnectionArgs, opts?: CustomResourceOptions);@overload
def VpnConnection(resource_name: str,
                  args: VpnConnectionArgs,
                  opts: Optional[ResourceOptions] = None)
@overload
def VpnConnection(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  cluster: Optional[str] = None,
                  location: Optional[str] = None,
                  enable_high_availability: Optional[bool] = None,
                  labels: Optional[Mapping[str, str]] = None,
                  name: Optional[str] = None,
                  nat_gateway_ip: Optional[str] = None,
                  project: Optional[str] = None,
                  router: Optional[str] = None,
                  vpc: Optional[str] = None,
                  vpc_project: Optional[VpnConnectionVpcProjectArgs] = None)func NewVpnConnection(ctx *Context, name string, args VpnConnectionArgs, opts ...ResourceOption) (*VpnConnection, error)public VpnConnection(string name, VpnConnectionArgs args, CustomResourceOptions? opts = null)
public VpnConnection(String name, VpnConnectionArgs args)
public VpnConnection(String name, VpnConnectionArgs args, CustomResourceOptions options)
type: gcp:edgecontainer:VpnConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpnConnectionResource = new Gcp.EdgeContainer.VpnConnection("vpnConnectionResource", new()
{
    Cluster = "string",
    Location = "string",
    EnableHighAvailability = false,
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
    NatGatewayIp = "string",
    Project = "string",
    Router = "string",
    Vpc = "string",
    VpcProject = new Gcp.EdgeContainer.Inputs.VpnConnectionVpcProjectArgs
    {
        ProjectId = "string",
    },
});
example, err := edgecontainer.NewVpnConnection(ctx, "vpnConnectionResource", &edgecontainer.VpnConnectionArgs{
	Cluster:                pulumi.String("string"),
	Location:               pulumi.String("string"),
	EnableHighAvailability: pulumi.Bool(false),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:         pulumi.String("string"),
	NatGatewayIp: pulumi.String("string"),
	Project:      pulumi.String("string"),
	Router:       pulumi.String("string"),
	Vpc:          pulumi.String("string"),
	VpcProject: &edgecontainer.VpnConnectionVpcProjectArgs{
		ProjectId: pulumi.String("string"),
	},
})
var vpnConnectionResource = new VpnConnection("vpnConnectionResource", VpnConnectionArgs.builder()
    .cluster("string")
    .location("string")
    .enableHighAvailability(false)
    .labels(Map.of("string", "string"))
    .name("string")
    .natGatewayIp("string")
    .project("string")
    .router("string")
    .vpc("string")
    .vpcProject(VpnConnectionVpcProjectArgs.builder()
        .projectId("string")
        .build())
    .build());
vpn_connection_resource = gcp.edgecontainer.VpnConnection("vpnConnectionResource",
    cluster="string",
    location="string",
    enable_high_availability=False,
    labels={
        "string": "string",
    },
    name="string",
    nat_gateway_ip="string",
    project="string",
    router="string",
    vpc="string",
    vpc_project={
        "project_id": "string",
    })
const vpnConnectionResource = new gcp.edgecontainer.VpnConnection("vpnConnectionResource", {
    cluster: "string",
    location: "string",
    enableHighAvailability: false,
    labels: {
        string: "string",
    },
    name: "string",
    natGatewayIp: "string",
    project: "string",
    router: "string",
    vpc: "string",
    vpcProject: {
        projectId: "string",
    },
});
type: gcp:edgecontainer:VpnConnection
properties:
    cluster: string
    enableHighAvailability: false
    labels:
        string: string
    location: string
    name: string
    natGatewayIp: string
    project: string
    router: string
    vpc: string
    vpcProject:
        projectId: string
VpnConnection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpnConnection resource accepts the following input properties:
- Cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- Location string
- Google Cloud Platform location.
- EnableHigh boolAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- Labels Dictionary<string, string>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The resource name of VPN connection
- NatGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Router string
- The VPN connection Cloud Router name.
- Vpc string
- The network ID of VPC to connect to.
- VpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- Cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- Location string
- Google Cloud Platform location.
- EnableHigh boolAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- Labels map[string]string
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Name string
- The resource name of VPN connection
- NatGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Router string
- The VPN connection Cloud Router name.
- Vpc string
- The network ID of VPC to connect to.
- VpcProject VpnConnection Vpc Project Args 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster String
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- location String
- Google Cloud Platform location.
- enableHigh BooleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Map<String,String>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The resource name of VPN connection
- natGateway StringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- router String
- The VPN connection Cloud Router name.
- vpc String
- The network ID of VPC to connect to.
- vpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- location string
- Google Cloud Platform location.
- enableHigh booleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels {[key: string]: string}
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name string
- The resource name of VPN connection
- natGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- router string
- The VPN connection Cloud Router name.
- vpc string
- The network ID of VPC to connect to.
- vpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster str
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- location str
- Google Cloud Platform location.
- enable_high_ boolavailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Mapping[str, str]
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name str
- The resource name of VPN connection
- nat_gateway_ strip 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- router str
- The VPN connection Cloud Router name.
- vpc str
- The network ID of VPC to connect to.
- vpc_project VpnConnection Vpc Project Args 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster String
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- location String
- Google Cloud Platform location.
- enableHigh BooleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Map<String>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- name String
- The resource name of VPN connection
- natGateway StringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- router String
- The VPN connection Cloud Router name.
- vpc String
- The network ID of VPC to connect to.
- vpcProject Property Map
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnConnection resource produces the following output properties:
- CreateTime string
- The time when the VPN connection was created.
- Details
List<VpnConnection Detail> 
- A nested object resource. Structure is documented below.
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- UpdateTime string
- The time when the VPN connection was last updated.
- CreateTime string
- The time when the VPN connection was created.
- Details
[]VpnConnection Detail 
- A nested object resource. Structure is documented below.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- UpdateTime string
- The time when the VPN connection was last updated.
- createTime String
- The time when the VPN connection was created.
- details
List<VpnConnection Detail> 
- A nested object resource. Structure is documented below.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- updateTime String
- The time when the VPN connection was last updated.
- createTime string
- The time when the VPN connection was created.
- details
VpnConnection Detail[] 
- A nested object resource. Structure is documented below.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- updateTime string
- The time when the VPN connection was last updated.
- create_time str
- The time when the VPN connection was created.
- details
Sequence[VpnConnection Detail] 
- A nested object resource. Structure is documented below.
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- update_time str
- The time when the VPN connection was last updated.
- createTime String
- The time when the VPN connection was created.
- details List<Property Map>
- A nested object resource. Structure is documented below.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- updateTime String
- The time when the VPN connection was last updated.
Look up Existing VpnConnection Resource
Get an existing VpnConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpnConnectionState, opts?: CustomResourceOptions): VpnConnection@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster: Optional[str] = None,
        create_time: Optional[str] = None,
        details: Optional[Sequence[VpnConnectionDetailArgs]] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        enable_high_availability: Optional[bool] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        nat_gateway_ip: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        router: Optional[str] = None,
        update_time: Optional[str] = None,
        vpc: Optional[str] = None,
        vpc_project: Optional[VpnConnectionVpcProjectArgs] = None) -> VpnConnectionfunc GetVpnConnection(ctx *Context, name string, id IDInput, state *VpnConnectionState, opts ...ResourceOption) (*VpnConnection, error)public static VpnConnection Get(string name, Input<string> id, VpnConnectionState? state, CustomResourceOptions? opts = null)public static VpnConnection get(String name, Output<String> id, VpnConnectionState state, CustomResourceOptions options)resources:  _:    type: gcp:edgecontainer:VpnConnection    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- CreateTime string
- The time when the VPN connection was created.
- Details
List<VpnConnection Detail> 
- A nested object resource. Structure is documented below.
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- EnableHigh boolAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- Labels Dictionary<string, string>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Location string
- Google Cloud Platform location.
- Name string
- The resource name of VPN connection
- NatGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- Router string
- The VPN connection Cloud Router name.
- UpdateTime string
- The time when the VPN connection was last updated.
- Vpc string
- The network ID of VPC to connect to.
- VpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- Cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- CreateTime string
- The time when the VPN connection was created.
- Details
[]VpnConnection Detail Args 
- A nested object resource. Structure is documented below.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- EnableHigh boolAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- Labels map[string]string
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- Location string
- Google Cloud Platform location.
- Name string
- The resource name of VPN connection
- NatGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- Router string
- The VPN connection Cloud Router name.
- UpdateTime string
- The time when the VPN connection was last updated.
- Vpc string
- The network ID of VPC to connect to.
- VpcProject VpnConnection Vpc Project Args 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster String
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- createTime String
- The time when the VPN connection was created.
- details
List<VpnConnection Detail> 
- A nested object resource. Structure is documented below.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enableHigh BooleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Map<String,String>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- location String
- Google Cloud Platform location.
- name String
- The resource name of VPN connection
- natGateway StringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- router String
- The VPN connection Cloud Router name.
- updateTime String
- The time when the VPN connection was last updated.
- vpc String
- The network ID of VPC to connect to.
- vpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster string
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- createTime string
- The time when the VPN connection was created.
- details
VpnConnection Detail[] 
- A nested object resource. Structure is documented below.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enableHigh booleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels {[key: string]: string}
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- location string
- Google Cloud Platform location.
- name string
- The resource name of VPN connection
- natGateway stringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- router string
- The VPN connection Cloud Router name.
- updateTime string
- The time when the VPN connection was last updated.
- vpc string
- The network ID of VPC to connect to.
- vpcProject VpnConnection Vpc Project 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster str
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- create_time str
- The time when the VPN connection was created.
- details
Sequence[VpnConnection Detail Args] 
- A nested object resource. Structure is documented below.
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enable_high_ boolavailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Mapping[str, str]
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- location str
- Google Cloud Platform location.
- name str
- The resource name of VPN connection
- nat_gateway_ strip 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- router str
- The VPN connection Cloud Router name.
- update_time str
- The time when the VPN connection was last updated.
- vpc str
- The network ID of VPC to connect to.
- vpc_project VpnConnection Vpc Project Args 
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
- cluster String
- The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
- createTime String
- The time when the VPN connection was created.
- details List<Property Map>
- A nested object resource. Structure is documented below.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enableHigh BooleanAvailability 
- Whether this VPN connection has HA enabled on cluster side. If enabled, when creating VPN connection we will attempt to use 2 ANG floating IPs.
- labels Map<String>
- Labels associated with this resource.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labelsfor all of the labels present on the resource.
- location String
- Google Cloud Platform location.
- name String
- The resource name of VPN connection
- natGateway StringIp 
- NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the customer needs to configure NAT such that only one external IP maps to the GMEC Anthos cluster. This is empty if NAT is not used.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- router String
- The VPN connection Cloud Router name.
- updateTime String
- The time when the VPN connection was last updated.
- vpc String
- The network ID of VPC to connect to.
- vpcProject Property Map
- Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.
Supporting Types
VpnConnectionDetail, VpnConnectionDetailArgs      
- CloudRouters List<VpnConnection Detail Cloud Router> 
- (Output) The Cloud Router info. Structure is documented below.
- CloudVpns List<VpnConnection Detail Cloud Vpn> 
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- Error string
- (Output) The error message. This is only populated when state=ERROR.
- State string
- (Output) The current connection state.
- CloudRouters []VpnConnection Detail Cloud Router 
- (Output) The Cloud Router info. Structure is documented below.
- CloudVpns []VpnConnection Detail Cloud Vpn 
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- Error string
- (Output) The error message. This is only populated when state=ERROR.
- State string
- (Output) The current connection state.
- cloudRouters List<VpnConnection Detail Cloud Router> 
- (Output) The Cloud Router info. Structure is documented below.
- cloudVpns List<VpnConnection Detail Cloud Vpn> 
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- error String
- (Output) The error message. This is only populated when state=ERROR.
- state String
- (Output) The current connection state.
- cloudRouters VpnConnection Detail Cloud Router[] 
- (Output) The Cloud Router info. Structure is documented below.
- cloudVpns VpnConnection Detail Cloud Vpn[] 
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- error string
- (Output) The error message. This is only populated when state=ERROR.
- state string
- (Output) The current connection state.
- cloud_routers Sequence[VpnConnection Detail Cloud Router] 
- (Output) The Cloud Router info. Structure is documented below.
- cloud_vpns Sequence[VpnConnection Detail Cloud Vpn] 
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- error str
- (Output) The error message. This is only populated when state=ERROR.
- state str
- (Output) The current connection state.
- cloudRouters List<Property Map>
- (Output) The Cloud Router info. Structure is documented below.
- cloudVpns List<Property Map>
- (Output) Each connection has multiple Cloud VPN gateways. Structure is documented below.
- error String
- (Output) The error message. This is only populated when state=ERROR.
- state String
- (Output) The current connection state.
VpnConnectionDetailCloudRouter, VpnConnectionDetailCloudRouterArgs          
- Name string
- The resource name of VPN connection
- Name string
- The resource name of VPN connection
- name String
- The resource name of VPN connection
- name string
- The resource name of VPN connection
- name str
- The resource name of VPN connection
- name String
- The resource name of VPN connection
VpnConnectionDetailCloudVpn, VpnConnectionDetailCloudVpnArgs          
- Gateway string
- (Output) The created Cloud VPN gateway name.
- Gateway string
- (Output) The created Cloud VPN gateway name.
- gateway String
- (Output) The created Cloud VPN gateway name.
- gateway string
- (Output) The created Cloud VPN gateway name.
- gateway str
- (Output) The created Cloud VPN gateway name.
- gateway String
- (Output) The created Cloud VPN gateway name.
VpnConnectionVpcProject, VpnConnectionVpcProjectArgs        
- ProjectId string
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
- ProjectId string
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
- projectId String
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
- projectId string
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
- project_id str
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
- projectId String
- The project of the VPC to connect to. If not specified, it is the same as the cluster project.
Import
VpnConnection can be imported using any of these accepted formats:
- projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}
- {{project}}/{{location}}/{{name}}
- {{location}}/{{name}}
When using the pulumi import command, VpnConnection can be imported using one of the formats above. For example:
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.