VpnConnectionArgs

data class VpnConnectionArgs(val cluster: Output<String>? = null, val enableHighAvailability: Output<Boolean>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val natGatewayIp: Output<String>? = null, val project: Output<String>? = null, val router: Output<String>? = null, val vpc: Output<String>? = null, val vpcProject: Output<VpnConnectionVpcProjectArgs>? = null) : ConvertibleToJava<VpnConnectionArgs>

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}}

Constructors

Link copied to clipboard
fun VpnConnectionArgs(cluster: Output<String>? = null, enableHighAvailability: Output<Boolean>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, name: Output<String>? = null, natGatewayIp: Output<String>? = null, project: Output<String>? = null, router: Output<String>? = null, vpc: Output<String>? = null, vpcProject: Output<VpnConnectionVpcProjectArgs>? = null)

Functions

Link copied to clipboard
open override fun toJava(): VpnConnectionArgs

Properties

Link copied to clipboard
val cluster: Output<String>? = null

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

Link copied to clipboard
val enableHighAvailability: Output<Boolean>? = null

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 labels: Output<Map<String, String>>? = null

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>? = null

Google Cloud Platform location.

Link copied to clipboard
val name: Output<String>? = null

The resource name of VPN connection

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

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>? = null

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 router: Output<String>? = null

The VPN connection Cloud Router name.

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

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.