ProjectCustomModule

class ProjectCustomModule : KotlinCustomResource

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 ProjectCustomModule, see:

Example Usage

Scc Project Custom Module Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.securitycenter.ProjectCustomModule;
import com.pulumi.gcp.securitycenter.ProjectCustomModuleArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigPredicateArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigResourceSelectorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ProjectCustomModule("example", ProjectCustomModuleArgs.builder()
.customConfig(ProjectCustomModuleCustomConfigArgs.builder()
.description("The rotation period of the identified cryptokey resource exceeds 30 days.")
.predicate(ProjectCustomModuleCustomConfigPredicateArgs.builder()
.expression("resource.rotationPeriod duration(\"2592000s\")")
.build())
.recommendation("Set the rotation period to at most 30 days.")
.resourceSelector(ProjectCustomModuleCustomConfigResourceSelectorArgs.builder()
.resourceTypes("cloudkms.googleapis.com/CryptoKey")
.build())
.severity("MEDIUM")
.build())
.displayName("basic_custom_module")
.enablementState("ENABLED")
.build());
}
}

Scc Project Custom Module Full

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.securitycenter.ProjectCustomModule;
import com.pulumi.gcp.securitycenter.ProjectCustomModuleArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigCustomOutputArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigPredicateArgs;
import com.pulumi.gcp.securitycenter.inputs.ProjectCustomModuleCustomConfigResourceSelectorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ProjectCustomModule("example", ProjectCustomModuleArgs.builder()
.customConfig(ProjectCustomModuleCustomConfigArgs.builder()
.customOutput(ProjectCustomModuleCustomConfigCustomOutputArgs.builder()
.properties(ProjectCustomModuleCustomConfigCustomOutputPropertyArgs.builder()
.name("duration")
.valueExpression(ProjectCustomModuleCustomConfigCustomOutputPropertyValueExpressionArgs.builder()
.description("description of the expression")
.expression("resource.rotationPeriod")
.location("location of the expression")
.title("Purpose of the expression")
.build())
.build())
.build())
.description("Description of the custom module")
.predicate(ProjectCustomModuleCustomConfigPredicateArgs.builder()
.description("description of the expression")
.expression("resource.rotationPeriod duration(\"2592000s\")")
.location("location of the expression")
.title("Purpose of the expression")
.build())
.recommendation("Steps to resolve violation")
.resourceSelector(ProjectCustomModuleCustomConfigResourceSelectorArgs.builder()
.resourceTypes("cloudkms.googleapis.com/CryptoKey")
.build())
.severity("LOW")
.build())
.displayName("full_custom_module")
.enablementState("ENABLED")
.build());
}
}

Import

ProjectCustomModule can be imported using any of these accepted formats

$ pulumi import gcp:securitycenter/projectCustomModule:ProjectCustomModule default projects/{{project}}/securityHealthAnalyticsSettings/customModules/{{name}}
$ pulumi import gcp:securitycenter/projectCustomModule:ProjectCustomModule default {{project}}/{{name}}
$ pulumi import gcp:securitycenter/projectCustomModule:ProjectCustomModule default {{name}}

Properties

Link copied to clipboard
val ancestorModule: Output<String>

If empty, indicates that the custom module was created in the organization,folder, or project in which you are viewing the custom module. Otherwise, ancestor_module specifies the organization or folder from which the custom module is inherited.

Link copied to clipboard

The user specified custom configuration for the module. Structure is documented below.

Link copied to clipboard
val displayName: 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.

Link copied to clipboard
val enablementState: Output<String>

The enablement state of the custom module. Possible values are: ENABLED, DISABLED.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val lastEditor: Output<String>

The editor that last updated the custom module.

Link copied to clipboard
val name: Output<String>

Name of the property for the custom output.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val updateTime: 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".

Link copied to clipboard
val urn: Output<String>