@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
150 lines • 7.7 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** 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");
/**
* ## 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, Object.assign(Object.assign({}, 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 ? state.createTime : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["interceptEndpointGroup"] = state ? state.interceptEndpointGroup : undefined;
resourceInputs["interceptEndpointGroupAssociationId"] = state ? state.interceptEndpointGroupAssociationId : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["locations"] = state ? state.locations : undefined;
resourceInputs["locationsDetails"] = state ? state.locationsDetails : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["network"] = state ? state.network : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["reconciling"] = state ? state.reconciling : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.interceptEndpointGroup === undefined) && !opts.urn) {
throw new Error("Missing required property 'interceptEndpointGroup'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.network === undefined) && !opts.urn) {
throw new Error("Missing required property 'network'");
}
resourceInputs["interceptEndpointGroup"] = args ? args.interceptEndpointGroup : undefined;
resourceInputs["interceptEndpointGroupAssociationId"] = args ? args.interceptEndpointGroupAssociationId : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["network"] = args ? args.network : undefined;
resourceInputs["project"] = args ? args.project : undefined;
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