ProjectCustomModuleArgs

data class ProjectCustomModuleArgs(val customConfig: Output<ProjectCustomModuleCustomConfigArgs>? = null, val displayName: Output<String>? = null, val enablementState: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<ProjectCustomModuleArgs>

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}}

Constructors

Link copied to clipboard
constructor(customConfig: Output<ProjectCustomModuleCustomConfigArgs>? = null, displayName: Output<String>? = null, enablementState: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard

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

Link copied to clipboard
val displayName: Output<String>? = null

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>? = null

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

Link copied to clipboard
val project: Output<String>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): ProjectCustomModuleArgs