"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.VpnConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * 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}}
 * ```
 */
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, id, state, opts) {
        return new VpnConnection(name, state, { ...opts, id: id });
    }
    /**
     * 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) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === VpnConnection.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["cluster"] = state?.cluster;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["details"] = state?.details;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["enableHighAvailability"] = state?.enableHighAvailability;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["natGatewayIp"] = state?.natGatewayIp;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["router"] = state?.router;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["vpc"] = state?.vpc;
            resourceInputs["vpcProject"] = state?.vpcProject;
        }
        else {
            const args = argsOrState;
            if (args?.cluster === undefined && !opts.urn) {
                throw new Error("Missing required property 'cluster'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["cluster"] = args?.cluster;
            resourceInputs["enableHighAvailability"] = args?.enableHighAvailability;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["natGatewayIp"] = args?.natGatewayIp;
            resourceInputs["project"] = args?.project;
            resourceInputs["router"] = args?.router;
            resourceInputs["vpc"] = args?.vpc;
            resourceInputs["vpcProject"] = args?.vpcProject;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["details"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(VpnConnection.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VpnConnection = VpnConnection;
/** @internal */
VpnConnection.__pulumiType = 'gcp:edgecontainer/vpnConnection:VpnConnection';
//# sourceMappingURL=vpnConnection.js.map