@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
194 lines • 8.84 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.SecurityProfileGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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,
* });
* ```
*
* ## 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, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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 ? state.createTime : undefined;
resourceInputs["customInterceptProfile"] = state ? state.customInterceptProfile : undefined;
resourceInputs["customMirroringProfile"] = state ? state.customMirroringProfile : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["etag"] = state ? state.etag : 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["threatPreventionProfile"] = state ? state.threatPreventionProfile : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
resourceInputs["customInterceptProfile"] = args ? args.customInterceptProfile : undefined;
resourceInputs["customMirroringProfile"] = args ? args.customMirroringProfile : undefined;
resourceInputs["description"] = args ? args.description : 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["threatPreventionProfile"] = args ? args.threatPreventionProfile : undefined;
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;
/** @internal */
SecurityProfileGroup.__pulumiType = 'gcp:networksecurity/securityProfileGroup:SecurityProfileGroup';
//# sourceMappingURL=securityProfileGroup.js.map