VpnConnection

class VpnConnection : KotlinCustomResource

A VPN connection To get more information about VpnConnection, see:

Example Usage

Edgecontainer Vpn Connection

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.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()
.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()
.cluster(cluster.name())
.location("us-central1")
.nodeLocation("us-central1-edge-example-edgesite")
.nodeCount(3)
.build());
var vpc = new Network("vpc");
var default_ = new VpnConnection("default", VpnConnectionArgs.builder()
.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());
}
}

Import

VpnConnection can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/vpnConnections * {{project}}/{{location}} * {{location}} In Terraform v1.5.0 and later, use an import block to import VpnConnection using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/vpnConnections" to = google_edgecontainer_vpn_connection.default }

$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), VpnConnection can be imported using one of the formats above. For example
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default projects/{{project}}/locations/{{location}}/vpnConnections
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{project}}/{{location}}
$ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{location}}

Properties

Link copied to clipboard
val cluster: Output<String>

The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.

Link copied to clipboard
val createTime: Output<String>

The time when the VPN connection was created.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard

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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<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_labels for all of the labels present on the resource.

Link copied to clipboard
val location: Output<String>

Google Cloud Platform location.

Link copied to clipboard
val name: Output<String>

The resource name of VPN connection

Link copied to clipboard
val natGatewayIp: Output<String>?

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.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val router: Output<String>?

The VPN connection Cloud Router name.

Link copied to clipboard
val updateTime: Output<String>

The time when the VPN connection was last updated.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpc: Output<String>?

The network ID of VPC to connect to.

Link copied to clipboard

Project detail of the VPC network. Required if VPC is in a different project than the cluster project. Structure is documented below.