UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

158 lines 7.64 kB
"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.InterceptEndpointGroupAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An endpoint group association represents a link between a network and an * endpoint group in the organization. * * Creating an association creates the networking infrastructure linking the * network to the endpoint group, but does not enable intercept by itself. * To enable intercept, the user must also create a network firewall policy * containing intercept rules and associate it with the network. * * ## Example Usage * * ### Network Security Intercept Endpoint Group Association Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const producerNetwork = new gcp.compute.Network("producer_network", { * name: "example-prod-network", * autoCreateSubnetworks: false, * }); * const consumerNetwork = new gcp.compute.Network("consumer_network", { * name: "example-cons-network", * autoCreateSubnetworks: false, * }); * const deploymentGroup = new gcp.networksecurity.InterceptDeploymentGroup("deployment_group", { * interceptDeploymentGroupId: "example-dg", * location: "global", * network: producerNetwork.id, * }); * const endpointGroup = new gcp.networksecurity.InterceptEndpointGroup("endpoint_group", { * interceptEndpointGroupId: "example-eg", * location: "global", * interceptDeploymentGroup: deploymentGroup.id, * }); * const _default = new gcp.networksecurity.InterceptEndpointGroupAssociation("default", { * interceptEndpointGroupAssociationId: "example-ega", * location: "global", * network: consumerNetwork.id, * interceptEndpointGroup: endpointGroup.id, * labels: { * foo: "bar", * }, * }); * ``` * * ## Import * * InterceptEndpointGroupAssociation can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}}` * * * `{{project}}/{{location}}/{{intercept_endpoint_group_association_id}}` * * * `{{location}}/{{intercept_endpoint_group_association_id}}` * * When using the `pulumi import` command, InterceptEndpointGroupAssociation can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networksecurity/interceptEndpointGroupAssociation:InterceptEndpointGroupAssociation default projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/interceptEndpointGroupAssociation:InterceptEndpointGroupAssociation default {{project}}/{{location}}/{{intercept_endpoint_group_association_id}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/interceptEndpointGroupAssociation:InterceptEndpointGroupAssociation default {{location}}/{{intercept_endpoint_group_association_id}} * ``` */ class InterceptEndpointGroupAssociation extends pulumi.CustomResource { /** * Get an existing InterceptEndpointGroupAssociation 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 InterceptEndpointGroupAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of InterceptEndpointGroupAssociation. 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'] === InterceptEndpointGroupAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["effectiveLabels"] = state?.effectiveLabels; resourceInputs["interceptEndpointGroup"] = state?.interceptEndpointGroup; resourceInputs["interceptEndpointGroupAssociationId"] = state?.interceptEndpointGroupAssociationId; resourceInputs["labels"] = state?.labels; resourceInputs["location"] = state?.location; resourceInputs["locations"] = state?.locations; resourceInputs["locationsDetails"] = state?.locationsDetails; resourceInputs["name"] = state?.name; resourceInputs["network"] = state?.network; 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?.interceptEndpointGroup === undefined && !opts.urn) { throw new Error("Missing required property 'interceptEndpointGroup'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.network === undefined && !opts.urn) { throw new Error("Missing required property 'network'"); } resourceInputs["interceptEndpointGroup"] = args?.interceptEndpointGroup; resourceInputs["interceptEndpointGroupAssociationId"] = args?.interceptEndpointGroupAssociationId; resourceInputs["labels"] = args?.labels; resourceInputs["location"] = args?.location; resourceInputs["network"] = args?.network; resourceInputs["project"] = args?.project; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["locations"] = undefined /*out*/; resourceInputs["locationsDetails"] = 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(InterceptEndpointGroupAssociation.__pulumiType, name, resourceInputs, opts); } } exports.InterceptEndpointGroupAssociation = InterceptEndpointGroupAssociation; /** @internal */ InterceptEndpointGroupAssociation.__pulumiType = 'gcp:networksecurity/interceptEndpointGroupAssociation:InterceptEndpointGroupAssociation'; //# sourceMappingURL=interceptEndpointGroupAssociation.js.map