"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.GlobalAddress = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a Global Address resource. Global addresses are used for
 * HTTP(S) load balancing.
 *
 * To get more information about GlobalAddress, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/v1/globalAddresses)
 * * How-to Guides
 *     * [Reserving a Static External IP Address](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address)
 *
 * ## Example Usage
 *
 * ### Global Address Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = new gcp.compute.GlobalAddress("default", {name: "global-appserver-ip"});
 * ```
 * ### Global Address Private Services Connect
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "my-network-name",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.compute.GlobalAddress("default", {
 *     name: "global-psconnect-ip",
 *     addressType: "INTERNAL",
 *     purpose: "PRIVATE_SERVICE_CONNECT",
 *     network: network.id,
 *     address: "100.100.100.105",
 * });
 * ```
 *
 * ## Import
 *
 * GlobalAddress can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/global/addresses/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, GlobalAddress can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/globalAddress:GlobalAddress default projects/{{project}}/global/addresses/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/globalAddress:GlobalAddress default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/globalAddress:GlobalAddress default {{name}}
 * ```
 */
class GlobalAddress extends pulumi.CustomResource {
    /**
     * Get an existing GlobalAddress 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 GlobalAddress(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of GlobalAddress.  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'] === GlobalAddress.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["address"] = state?.address;
            resourceInputs["addressType"] = state?.addressType;
            resourceInputs["creationTimestamp"] = state?.creationTimestamp;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["ipVersion"] = state?.ipVersion;
            resourceInputs["labelFingerprint"] = state?.labelFingerprint;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["prefixLength"] = state?.prefixLength;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["purpose"] = state?.purpose;
            resourceInputs["selfLink"] = state?.selfLink;
        }
        else {
            const args = argsOrState;
            resourceInputs["address"] = args?.address;
            resourceInputs["addressType"] = args?.addressType;
            resourceInputs["description"] = args?.description;
            resourceInputs["ipVersion"] = args?.ipVersion;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["name"] = args?.name;
            resourceInputs["network"] = args?.network;
            resourceInputs["prefixLength"] = args?.prefixLength;
            resourceInputs["project"] = args?.project;
            resourceInputs["purpose"] = args?.purpose;
            resourceInputs["creationTimestamp"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["labelFingerprint"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["selfLink"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(GlobalAddress.__pulumiType, name, resourceInputs, opts);
    }
}
exports.GlobalAddress = GlobalAddress;
/** @internal */
GlobalAddress.__pulumiType = 'gcp:compute/globalAddress:GlobalAddress';
//# sourceMappingURL=globalAddress.js.map