UNPKG

@pulumi/gcp

Version:

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

121 lines 6.74 kB
"use strict"; // *** 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.FirewallEndpointAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Firewall endpoint association links a firewall endpoint to a VPC network in * the same zone. After you define this association, Cloud Firewall forwards the * zonal workload traffic in your VPC network that requires layer 7 inspection to * the attached firewall endpoint. * * To get more information about FirewallEndpointAssociation, see: * * * [API documentation](https://cloud.google.com/firewall/docs/reference/network-security/rest/v1/projects.locations.firewallEndpointAssociations#FirewallEndpointAssociation) * * How-to Guides * * [Create and associate firewall endpoints](https://cloud.google.com/firewall/docs/configure-firewall-endpoints) * * [Firewall endpoint overview](https://cloud.google.com/firewall/docs/about-firewall-endpoints) * * > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource, * you must specify a `billingProjectId` and set `userProjectOverride` to true * in the provider configuration. Otherwise the ACM API will return a 403 error. * Your account must have the `serviceusage.services.use` permission on the * `billingProjectId` you defined. * * ## Example Usage * * ## Import * * FirewallEndpointAssociation can be imported using any of these accepted formats: * * * `{{parent}}/locations/{{location}}/firewallEndpointAssociations/{{name}}` * * When using the `pulumi import` command, FirewallEndpointAssociation can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networksecurity/firewallEndpointAssociation:FirewallEndpointAssociation default {{parent}}/locations/{{location}}/firewallEndpointAssociations/{{name}} * ``` */ class FirewallEndpointAssociation extends pulumi.CustomResource { /** * Get an existing FirewallEndpointAssociation 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 FirewallEndpointAssociation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FirewallEndpointAssociation. 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'] === FirewallEndpointAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["disabled"] = state ? state.disabled : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["firewallEndpoint"] = state ? state.firewallEndpoint : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["network"] = state ? state.network : undefined; resourceInputs["parent"] = state ? state.parent : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["selfLink"] = state ? state.selfLink : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["tlsInspectionPolicy"] = state ? state.tlsInspectionPolicy : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.firewallEndpoint === undefined) && !opts.urn) { throw new Error("Missing required property 'firewallEndpoint'"); } 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["disabled"] = args ? args.disabled : undefined; resourceInputs["firewallEndpoint"] = args ? args.firewallEndpoint : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["network"] = args ? args.network : undefined; resourceInputs["parent"] = args ? args.parent : undefined; resourceInputs["tlsInspectionPolicy"] = args ? args.tlsInspectionPolicy : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["selfLink"] = 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(FirewallEndpointAssociation.__pulumiType, name, resourceInputs, opts); } } exports.FirewallEndpointAssociation = FirewallEndpointAssociation; /** @internal */ FirewallEndpointAssociation.__pulumiType = 'gcp:networksecurity/firewallEndpointAssociation:FirewallEndpointAssociation'; //# sourceMappingURL=firewallEndpointAssociation.js.map