@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
288 lines • 13.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Represents an instance of a Security Health Analytics custom module, including
* its full module name, display name, enablement state, and last updated time.
* You can create a custom module at the organization, folder, or project level.
* Custom modules that you create at the organization or folder level are inherited
* by the child folders and projects.
*
* To get more information about FolderSecurityHealthAnalyticsCustomModule, see:
*
* * [API documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules)
* * How-to Guides
* * [Overview of custom modules for Security Health Analytics](https://cloud.google.com/security-command-center/docs/custom-modules-sha-overview)
*
* ## Example Usage
*
* ### Scc Management Folder Security Health Analytics Custom Module Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const folder = new gcp.organizations.Folder("folder", {
* parent: "organizations/123456789",
* displayName: "folder-name",
* deletionProtection: false,
* });
* const example = new gcp.securitycenter.ManagementFolderSecurityHealthAnalyticsCustomModule("example", {
* folder: folder.folderId,
* location: "global",
* displayName: "basic_custom_module",
* enablementState: "ENABLED",
* customConfig: {
* predicate: {
* expression: "resource.rotationPeriod > duration(\"2592000s\")",
* },
* resourceSelector: {
* resourceTypes: ["cloudkms.googleapis.com/CryptoKey"],
* },
* description: "The rotation period of the identified cryptokey resource exceeds 30 days.",
* recommendation: "Set the rotation period to at most 30 days.",
* severity: "MEDIUM",
* },
* });
* ```
* ### Scc Management Folder Security Health Analytics Custom Module Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const folder = new gcp.organizations.Folder("folder", {
* parent: "organizations/123456789",
* displayName: "folder-name",
* deletionProtection: false,
* });
* const example = new gcp.securitycenter.ManagementFolderSecurityHealthAnalyticsCustomModule("example", {
* folder: folder.folderId,
* location: "global",
* displayName: "full_custom_module",
* enablementState: "ENABLED",
* customConfig: {
* predicate: {
* expression: "resource.rotationPeriod > duration(\"2592000s\")",
* title: "Purpose of the expression",
* description: "description of the expression",
* location: "location of the expression",
* },
* customOutput: {
* properties: [{
* name: "duration",
* valueExpression: {
* expression: "resource.rotationPeriod",
* title: "Purpose of the expression",
* description: "description of the expression",
* location: "location of the expression",
* },
* }],
* },
* resourceSelector: {
* resourceTypes: ["cloudkms.googleapis.com/CryptoKey"],
* },
* severity: "LOW",
* description: "Description of the custom module",
* recommendation: "Steps to resolve violation",
* },
* });
* ```
*
* ## Import
*
* FolderSecurityHealthAnalyticsCustomModule can be imported using any of these accepted formats:
*
* * `folders/{{folder}}/locations/{{location}}/securityHealthAnalyticsCustomModules/{{name}}`
* * `{{folder}}/{{location}}/{{name}}`
*
* When using the `pulumi import` command, FolderSecurityHealthAnalyticsCustomModule can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:securitycenter/managementFolderSecurityHealthAnalyticsCustomModule:ManagementFolderSecurityHealthAnalyticsCustomModule default folders/{{folder}}/locations/{{location}}/securityHealthAnalyticsCustomModules/{{name}}
* $ pulumi import gcp:securitycenter/managementFolderSecurityHealthAnalyticsCustomModule:ManagementFolderSecurityHealthAnalyticsCustomModule default {{folder}}/{{location}}/{{name}}
* ```
*/
export declare class ManagementFolderSecurityHealthAnalyticsCustomModule extends pulumi.CustomResource {
/**
* Get an existing ManagementFolderSecurityHealthAnalyticsCustomModule 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: string, id: pulumi.Input<pulumi.ID>, state?: ManagementFolderSecurityHealthAnalyticsCustomModuleState, opts?: pulumi.CustomResourceOptions): ManagementFolderSecurityHealthAnalyticsCustomModule;
/**
* Returns true if the given object is an instance of ManagementFolderSecurityHealthAnalyticsCustomModule. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ManagementFolderSecurityHealthAnalyticsCustomModule;
/**
* If empty, indicates that the custom module was created in the organization, folder,
* or project in which you are viewing the custom module. Otherwise, ancestorModule
* specifies the organization or folder from which the custom module is inherited.
*/
readonly ancestorModule: pulumi.Output<string>;
/**
* The user specified custom configuration for the module.
* Structure is documented below.
*/
readonly customConfig: pulumi.Output<outputs.securitycenter.ManagementFolderSecurityHealthAnalyticsCustomModuleCustomConfig | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The display name of the Security Health Analytics custom module. This
* display name becomes the finding category for all findings that are
* returned by this custom module. The display name must be between 1 and
* 128 characters, start with a lowercase letter, and contain alphanumeric
* characters or underscores only.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* The enablement state of the custom module.
* Possible values are: `ENABLED`, `DISABLED`.
*/
readonly enablementState: pulumi.Output<string | undefined>;
/**
* Numerical ID of the parent folder.
*/
readonly folder: pulumi.Output<string>;
/**
* The editor that last updated the custom module.
*/
readonly lastEditor: pulumi.Output<string>;
/**
* Location ID of the parent organization. If not provided, 'global' will be used as the default location.
*/
readonly location: pulumi.Output<string | undefined>;
/**
* The resource name of the custom module. Its format is "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule}".
* The id {securityHealthAnalyticsCustomModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.
*/
readonly name: pulumi.Output<string>;
/**
* The time at which the custom module was last updated.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
* up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a ManagementFolderSecurityHealthAnalyticsCustomModule resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ManagementFolderSecurityHealthAnalyticsCustomModuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ManagementFolderSecurityHealthAnalyticsCustomModule resources.
*/
export interface ManagementFolderSecurityHealthAnalyticsCustomModuleState {
/**
* If empty, indicates that the custom module was created in the organization, folder,
* or project in which you are viewing the custom module. Otherwise, ancestorModule
* specifies the organization or folder from which the custom module is inherited.
*/
ancestorModule?: pulumi.Input<string | undefined>;
/**
* The user specified custom configuration for the module.
* Structure is documented below.
*/
customConfig?: pulumi.Input<inputs.securitycenter.ManagementFolderSecurityHealthAnalyticsCustomModuleCustomConfig | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The display name of the Security Health Analytics custom module. This
* display name becomes the finding category for all findings that are
* returned by this custom module. The display name must be between 1 and
* 128 characters, start with a lowercase letter, and contain alphanumeric
* characters or underscores only.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* The enablement state of the custom module.
* Possible values are: `ENABLED`, `DISABLED`.
*/
enablementState?: pulumi.Input<string | undefined>;
/**
* Numerical ID of the parent folder.
*/
folder?: pulumi.Input<string | undefined>;
/**
* The editor that last updated the custom module.
*/
lastEditor?: pulumi.Input<string | undefined>;
/**
* Location ID of the parent organization. If not provided, 'global' will be used as the default location.
*/
location?: pulumi.Input<string | undefined>;
/**
* The resource name of the custom module. Its format is "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule}".
* The id {securityHealthAnalyticsCustomModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.
*/
name?: pulumi.Input<string | undefined>;
/**
* The time at which the custom module was last updated.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
* up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a ManagementFolderSecurityHealthAnalyticsCustomModule resource.
*/
export interface ManagementFolderSecurityHealthAnalyticsCustomModuleArgs {
/**
* The user specified custom configuration for the module.
* Structure is documented below.
*/
customConfig?: pulumi.Input<inputs.securitycenter.ManagementFolderSecurityHealthAnalyticsCustomModuleCustomConfig | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The display name of the Security Health Analytics custom module. This
* display name becomes the finding category for all findings that are
* returned by this custom module. The display name must be between 1 and
* 128 characters, start with a lowercase letter, and contain alphanumeric
* characters or underscores only.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* The enablement state of the custom module.
* Possible values are: `ENABLED`, `DISABLED`.
*/
enablementState?: pulumi.Input<string | undefined>;
/**
* Numerical ID of the parent folder.
*/
folder: pulumi.Input<string>;
/**
* Location ID of the parent organization. If not provided, 'global' will be used as the default location.
*/
location?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=managementFolderSecurityHealthAnalyticsCustomModule.d.ts.map