@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
313 lines (312 loc) • 11.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A VPN connection
*
* To get more information about VpnConnection, see:
*
* * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/container/rest/v1/projects.locations.vpnConnections)
* * How-to Guides
* * [Google Distributed Cloud Edge](https://cloud.google.com/distributed-cloud/edge/latest/docs)
*
* ## Example Usage
*
* ### Edgecontainer Vpn Connection
*
* ```typescript
* 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
*
* 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:
*
* ```sh
* $ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default projects/{{project}}/locations/{{location}}/vpnConnections/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:edgecontainer/vpnConnection:VpnConnection default {{location}}/{{name}}
* ```
*/
export declare class VpnConnection extends pulumi.CustomResource {
/**
* Get an existing VpnConnection resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VpnConnectionState, opts?: pulumi.CustomResourceOptions): VpnConnection;
/**
* Returns true if the given object is an instance of VpnConnection. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is VpnConnection;
/**
* The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
*/
readonly cluster: pulumi.Output<string>;
/**
* The time when the VPN connection was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* A nested object resource.
* Structure is documented below.
*/
readonly details: pulumi.Output<outputs.edgecontainer.VpnConnectionDetail[]>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* 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.
*/
readonly enableHighAvailability: pulumi.Output<boolean>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Google Cloud Platform location.
*/
readonly location: pulumi.Output<string>;
/**
* The resource name of VPN connection
*/
readonly name: pulumi.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.
*/
readonly natGatewayIp: pulumi.Output<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The VPN connection Cloud Router name.
*/
readonly router: pulumi.Output<string | undefined>;
/**
* The time when the VPN connection was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* The network ID of VPC to connect to.
*/
readonly vpc: pulumi.Output<string | undefined>;
/**
* Project detail of the VPC network. Required if VPC is in a different project than the cluster project.
* Structure is documented below.
*/
readonly vpcProject: pulumi.Output<outputs.edgecontainer.VpnConnectionVpcProject | undefined>;
/**
* Create a VpnConnection resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VpnConnectionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VpnConnection resources.
*/
export interface VpnConnectionState {
/**
* The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
*/
cluster?: pulumi.Input<string>;
/**
* The time when the VPN connection was created.
*/
createTime?: pulumi.Input<string>;
/**
* A nested object resource.
* Structure is documented below.
*/
details?: pulumi.Input<pulumi.Input<inputs.edgecontainer.VpnConnectionDetail>[]>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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.
*/
enableHighAvailability?: pulumi.Input<boolean>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Google Cloud Platform location.
*/
location?: pulumi.Input<string>;
/**
* The resource name of VPN connection
*/
name?: pulumi.Input<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.
*/
natGatewayIp?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The VPN connection Cloud Router name.
*/
router?: pulumi.Input<string>;
/**
* The time when the VPN connection was last updated.
*/
updateTime?: pulumi.Input<string>;
/**
* The network ID of VPC to connect to.
*/
vpc?: pulumi.Input<string>;
/**
* Project detail of the VPC network. Required if VPC is in a different project than the cluster project.
* Structure is documented below.
*/
vpcProject?: pulumi.Input<inputs.edgecontainer.VpnConnectionVpcProject>;
}
/**
* The set of arguments for constructing a VpnConnection resource.
*/
export interface VpnConnectionArgs {
/**
* The canonical Cluster name to connect to. It is in the form of projects/{project}/locations/{location}/clusters/{cluster}.
*/
cluster: pulumi.Input<string>;
/**
* 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.
*/
enableHighAvailability?: pulumi.Input<boolean>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Google Cloud Platform location.
*/
location: pulumi.Input<string>;
/**
* The resource name of VPN connection
*/
name?: pulumi.Input<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.
*/
natGatewayIp?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The VPN connection Cloud Router name.
*/
router?: pulumi.Input<string>;
/**
* The network ID of VPC to connect to.
*/
vpc?: pulumi.Input<string>;
/**
* Project detail of the VPC network. Required if VPC is in a different project than the cluster project.
* Structure is documented below.
*/
vpcProject?: pulumi.Input<inputs.edgecontainer.VpnConnectionVpcProject>;
}