@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
254 lines • 10.7 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecurityProfileGroup = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* A security profile group defines a container for security profiles.
*
* To get more information about SecurityProfileGroup, see:
*
* * [API documentation](https://cloud.google.com/firewall/docs/reference/network-security/rest/v1/organizations.locations.securityProfileGroups)
* * How-to Guides
* * [Create and manage security profile groups](https://cloud.google.com/firewall/docs/configure-security-profile-groups)
* * [Security profile groups overview](https://cloud.google.com/firewall/docs/about-security-profile-groups)
*
* ## Example Usage
*
* ### Network Security Security Profile Group Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const securityProfile = new gcp.networksecurity.SecurityProfile("security_profile", {
* name: "sec-profile",
* type: "THREAT_PREVENTION",
* parent: "organizations/123456789",
* location: "global",
* });
* const _default = new gcp.networksecurity.SecurityProfileGroup("default", {
* name: "sec-profile-group",
* parent: "organizations/123456789",
* description: "my description",
* threatPreventionProfile: securityProfile.id,
* labels: {
* foo: "bar",
* },
* });
* ```
* ### Network Security Security Profile Group Mirroring
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.compute.Network("default", {
* name: "network",
* autoCreateSubnetworks: false,
* });
* const defaultMirroringDeploymentGroup = new gcp.networksecurity.MirroringDeploymentGroup("default", {
* mirroringDeploymentGroupId: "deployment-group",
* location: "global",
* network: _default.id,
* });
* const defaultMirroringEndpointGroup = new gcp.networksecurity.MirroringEndpointGroup("default", {
* mirroringEndpointGroupId: "endpoint-group",
* location: "global",
* mirroringDeploymentGroup: defaultMirroringDeploymentGroup.id,
* });
* const defaultSecurityProfile = new gcp.networksecurity.SecurityProfile("default", {
* name: "sec-profile",
* parent: "organizations/123456789",
* description: "my description",
* type: "CUSTOM_MIRRORING",
* customMirroringProfile: {
* mirroringEndpointGroup: defaultMirroringEndpointGroup.id,
* },
* });
* const defaultSecurityProfileGroup = new gcp.networksecurity.SecurityProfileGroup("default", {
* name: "sec-profile-group",
* parent: "organizations/123456789",
* description: "my description",
* customMirroringProfile: defaultSecurityProfile.id,
* });
* ```
* ### Network Security Security Profile Group Intercept
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.compute.Network("default", {
* name: "network",
* autoCreateSubnetworks: false,
* });
* const defaultInterceptDeploymentGroup = new gcp.networksecurity.InterceptDeploymentGroup("default", {
* interceptDeploymentGroupId: "deployment-group",
* location: "global",
* network: _default.id,
* });
* const defaultInterceptEndpointGroup = new gcp.networksecurity.InterceptEndpointGroup("default", {
* interceptEndpointGroupId: "endpoint-group",
* location: "global",
* interceptDeploymentGroup: defaultInterceptDeploymentGroup.id,
* });
* const defaultSecurityProfile = new gcp.networksecurity.SecurityProfile("default", {
* name: "sec-profile",
* parent: "organizations/123456789",
* description: "my description",
* type: "CUSTOM_INTERCEPT",
* customInterceptProfile: {
* interceptEndpointGroup: defaultInterceptEndpointGroup.id,
* },
* });
* const defaultSecurityProfileGroup = new gcp.networksecurity.SecurityProfileGroup("default", {
* name: "sec-profile-group",
* parent: "organizations/123456789",
* description: "my description",
* customInterceptProfile: defaultSecurityProfile.id,
* });
* ```
* ### Network Security Security Profile Group Url Filtering
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const securityProfile = new gcp.networksecurity.SecurityProfile("security_profile", {
* name: "sec-profile",
* location: "global",
* type: "URL_FILTERING",
* urlFilteringProfile: {
* urlFilters: [{
* priority: 1,
* filteringAction: "ALLOW",
* urls: [
* "*example.com",
* "*about.example.com",
* "*help.example.com",
* ],
* }],
* },
* parent: "organizations/123456789",
* });
* const _default = new gcp.networksecurity.SecurityProfileGroup("default", {
* name: "sec-profile-group",
* parent: "organizations/123456789",
* description: "my description",
* urlFilteringProfile: securityProfile.id,
* labels: {
* foo: "bar",
* },
* });
* ```
*
* ## Import
*
* SecurityProfileGroup can be imported using any of these accepted formats:
*
* * `{{parent}}/locations/{{location}}/securityProfileGroups/{{name}}`
*
* When using the `pulumi import` command, SecurityProfileGroup can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:networksecurity/securityProfileGroup:SecurityProfileGroup default {{parent}}/locations/{{location}}/securityProfileGroups/{{name}}
* ```
*/
class SecurityProfileGroup extends pulumi.CustomResource {
/**
* Get an existing SecurityProfileGroup 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 SecurityProfileGroup(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:networksecurity/securityProfileGroup:SecurityProfileGroup';
/**
* Returns true if the given object is an instance of SecurityProfileGroup. 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'] === SecurityProfileGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["customInterceptProfile"] = state?.customInterceptProfile;
resourceInputs["customMirroringProfile"] = state?.customMirroringProfile;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["description"] = state?.description;
resourceInputs["effectiveLabels"] = state?.effectiveLabels;
resourceInputs["etag"] = state?.etag;
resourceInputs["labels"] = state?.labels;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["parent"] = state?.parent;
resourceInputs["pulumiLabels"] = state?.pulumiLabels;
resourceInputs["threatPreventionProfile"] = state?.threatPreventionProfile;
resourceInputs["updateTime"] = state?.updateTime;
resourceInputs["urlFilteringProfile"] = state?.urlFilteringProfile;
}
else {
const args = argsOrState;
resourceInputs["customInterceptProfile"] = args?.customInterceptProfile;
resourceInputs["customMirroringProfile"] = args?.customMirroringProfile;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["description"] = args?.description;
resourceInputs["labels"] = args?.labels;
resourceInputs["location"] = args?.location;
resourceInputs["name"] = args?.name;
resourceInputs["parent"] = args?.parent;
resourceInputs["threatPreventionProfile"] = args?.threatPreventionProfile;
resourceInputs["urlFilteringProfile"] = args?.urlFilteringProfile;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(SecurityProfileGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.SecurityProfileGroup = SecurityProfileGroup;
//# sourceMappingURL=securityProfileGroup.js.map