@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
133 lines • 6.49 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.FirewallEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* A Firewall endpoint is a Cloud Firewall resource that enables
* layer 7 advanced protection capabilities, such as intrusion prevention,
* in your network.
*
* To get more information about FirewallEndpoint, see:
*
* * [API documentation](https://cloud.google.com/firewall/docs/reference/network-security/rest/v1/organizations.locations.firewallEndpoints)
* * 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
*
* ### Network Security Firewall Endpoint Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.networksecurity.FirewallEndpoint("default", {
* name: "my-firewall-endpoint",
* parent: "organizations/123456789",
* location: "us-central1-a",
* billingProjectId: "my-project-name",
* labels: {
* foo: "bar",
* },
* });
* ```
*
* ## Import
*
* FirewallEndpoint can be imported using any of these accepted formats:
*
* * `{{parent}}/locations/{{location}}/firewallEndpoints/{{name}}`
*
* When using the `pulumi import` command, FirewallEndpoint can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:networksecurity/firewallEndpoint:FirewallEndpoint default {{parent}}/locations/{{location}}/firewallEndpoints/{{name}}
* ```
*/
class FirewallEndpoint extends pulumi.CustomResource {
/**
* Get an existing FirewallEndpoint 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 FirewallEndpoint(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FirewallEndpoint. 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'] === FirewallEndpoint.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["associatedNetworks"] = state ? state.associatedNetworks : undefined;
resourceInputs["billingProjectId"] = state ? state.billingProjectId : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : 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["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.billingProjectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'billingProjectId'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.parent === undefined) && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["billingProjectId"] = args ? args.billingProjectId : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parent"] = args ? args.parent : undefined;
resourceInputs["associatedNetworks"] = undefined /*out*/;
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(FirewallEndpoint.__pulumiType, name, resourceInputs, opts);
}
}
exports.FirewallEndpoint = FirewallEndpoint;
/** @internal */
FirewallEndpoint.__pulumiType = 'gcp:networksecurity/firewallEndpoint:FirewallEndpoint';
//# sourceMappingURL=firewallEndpoint.js.map