"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.MirroringDeployment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A deployment represents a zonal mirroring backend ready to accept
 * GENEVE-encapsulated replica traffic, e.g. a zonal instance group fronted by
 * an internal passthrough load balancer. Deployments are always part of a
 * global deployment group which represents a global mirroring service.
 *
 * To get more information about MirroringDeployment, see:
 *
 * * [API documentation](https://cloud.google.com/network-security-integration/docs/reference/rest/v1/projects.locations.mirroringDeployments)
 * * How-to Guides
 *     * [Mirroring deployment overview](https://cloud.google.com/network-security-integration/docs/out-of-band/deployments-overview)
 *
 * ## Example Usage
 *
 * ### Network Security Mirroring Deployment Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "example-network",
 *     autoCreateSubnetworks: false,
 * });
 * const subnetwork = new gcp.compute.Subnetwork("subnetwork", {
 *     name: "example-subnet",
 *     region: "us-central1",
 *     ipCidrRange: "10.1.0.0/16",
 *     network: network.name,
 * });
 * const healthCheck = new gcp.compute.RegionHealthCheck("health_check", {
 *     name: "example-hc",
 *     region: "us-central1",
 *     httpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const backendService = new gcp.compute.RegionBackendService("backend_service", {
 *     name: "example-bs",
 *     region: "us-central1",
 *     healthChecks: healthCheck.id,
 *     protocol: "UDP",
 *     loadBalancingScheme: "INTERNAL",
 * });
 * const forwardingRule = new gcp.compute.ForwardingRule("forwarding_rule", {
 *     name: "example-fwr",
 *     region: "us-central1",
 *     network: network.name,
 *     subnetwork: subnetwork.name,
 *     backendService: backendService.id,
 *     loadBalancingScheme: "INTERNAL",
 *     ports: ["6081"],
 *     ipProtocol: "UDP",
 *     isMirroringCollector: true,
 * });
 * const deploymentGroup = new gcp.networksecurity.MirroringDeploymentGroup("deployment_group", {
 *     mirroringDeploymentGroupId: "example-dg",
 *     location: "global",
 *     network: network.id,
 * });
 * const _default = new gcp.networksecurity.MirroringDeployment("default", {
 *     mirroringDeploymentId: "example-deployment",
 *     location: "us-central1-a",
 *     forwardingRule: forwardingRule.id,
 *     mirroringDeploymentGroup: deploymentGroup.id,
 *     description: "some description",
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * MirroringDeployment can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}}`
 *
 * * `{{project}}/{{location}}/{{mirroring_deployment_id}}`
 *
 * * `{{location}}/{{mirroring_deployment_id}}`
 *
 * When using the `pulumi import` command, MirroringDeployment can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeployment:MirroringDeployment default projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeployment:MirroringDeployment default {{project}}/{{location}}/{{mirroring_deployment_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeployment:MirroringDeployment default {{location}}/{{mirroring_deployment_id}}
 * ```
 */
class MirroringDeployment extends pulumi.CustomResource {
    /**
     * Get an existing MirroringDeployment 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 MirroringDeployment(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of MirroringDeployment.  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'] === MirroringDeployment.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["forwardingRule"] = state?.forwardingRule;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["mirroringDeploymentGroup"] = state?.mirroringDeploymentGroup;
            resourceInputs["mirroringDeploymentId"] = state?.mirroringDeploymentId;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["state"] = state?.state;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.forwardingRule === undefined && !opts.urn) {
                throw new Error("Missing required property 'forwardingRule'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.mirroringDeploymentGroup === undefined && !opts.urn) {
                throw new Error("Missing required property 'mirroringDeploymentGroup'");
            }
            if (args?.mirroringDeploymentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'mirroringDeploymentId'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["forwardingRule"] = args?.forwardingRule;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["mirroringDeploymentGroup"] = args?.mirroringDeploymentGroup;
            resourceInputs["mirroringDeploymentId"] = args?.mirroringDeploymentId;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(MirroringDeployment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MirroringDeployment = MirroringDeployment;
/** @internal */
MirroringDeployment.__pulumiType = 'gcp:networksecurity/mirroringDeployment:MirroringDeployment';
//# sourceMappingURL=mirroringDeployment.js.map