OrganizationConfiguration class
Manages the GuardDuty Organization Configuration in the current AWS Region. The AWS account utilizing this resource must have been assigned as a delegated Organization administrator account, e.g., via the aws.guardduty.OrganizationAdminAccount resource. More information about Organizations support in GuardDuty can be found in the GuardDuty User Guide.
> NOTE: This is an advanced resource. The provider will automatically assume management of the GuardDuty Organization Configuration without import and perform no actions on removal from the resource configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.guardduty.Detector("example", {enable: true});
const exampleOrganizationConfiguration = new aws.guardduty.OrganizationConfiguration("example", {
datasources: {
s3Logs: {
autoEnable: true,
},
kubernetes: {
auditLogs: {
enable: true,
},
},
malwareProtection: {
scanEc2InstanceWithFindings: {
ebsVolumes: {
autoEnable: true,
},
},
},
},
autoEnableOrganizationMembers: "ALL",
detectorId: example.id,
});
import pulumi
import pulumi_aws as aws
example = aws.guardduty.Detector("example", enable=True)
example_organization_configuration = aws.guardduty.OrganizationConfiguration("example",
datasources={
"s3_logs": {
"auto_enable": True,
},
"kubernetes": {
"audit_logs": {
"enable": True,
},
},
"malware_protection": {
"scan_ec2_instance_with_findings": {
"ebs_volumes": {
"auto_enable": True,
},
},
},
},
auto_enable_organization_members="ALL",
detector_id=example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.GuardDuty.Detector("example", new()
{
Enable = true,
});
var exampleOrganizationConfiguration = new Aws.GuardDuty.OrganizationConfiguration("example", new()
{
Datasources = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesArgs
{
S3Logs = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesS3LogsArgs
{
AutoEnable = true,
},
Kubernetes = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesKubernetesArgs
{
AuditLogs = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs
{
Enable = true,
},
},
MalwareProtection = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesMalwareProtectionArgs
{
ScanEc2InstanceWithFindings = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs
{
EbsVolumes = new Aws.GuardDuty.Inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs
{
AutoEnable = true,
},
},
},
},
AutoEnableOrganizationMembers = "ALL",
DetectorId = example.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/guardduty"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := guardduty.NewDetector(ctx, "example", &guardduty.DetectorArgs{
Enable: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = guardduty.NewOrganizationConfiguration(ctx, "example", &guardduty.OrganizationConfigurationArgs{
Datasources: &guardduty.OrganizationConfigurationDatasourcesArgs{
S3Logs: &guardduty.OrganizationConfigurationDatasourcesS3LogsArgs{
AutoEnable: pulumi.Bool(true),
},
Kubernetes: &guardduty.OrganizationConfigurationDatasourcesKubernetesArgs{
AuditLogs: &guardduty.OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs{
Enable: pulumi.Bool(true),
},
},
MalwareProtection: &guardduty.OrganizationConfigurationDatasourcesMalwareProtectionArgs{
ScanEc2InstanceWithFindings: &guardduty.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs{
EbsVolumes: &guardduty.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs{
AutoEnable: pulumi.Bool(true),
},
},
},
},
AutoEnableOrganizationMembers: pulumi.String("ALL"),
DetectorId: example.ID().ToIDOutput().ToStringOutput(),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_guardduty_detector" "example" {
enable = true
}
resource "aws_guardduty_organizationconfiguration" "example" {
datasources = {
s3_logs = {
auto_enable = true
}
kubernetes = {
audit_logs = {
enable = true
}
}
malware_protection = {
scan_ec2_instance_with_findings = {
ebs_volumes = {
auto_enable = true
}
}
}
}
auto_enable_organization_members = "ALL"
detector_id = aws_guardduty_detector.example.id
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.guardduty.Detector;
import com.pulumi.aws.guardduty.DetectorArgs;
import com.pulumi.aws.guardduty.OrganizationConfiguration;
import com.pulumi.aws.guardduty.OrganizationConfigurationArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesS3LogsArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesKubernetesArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs;
import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Detector("example", DetectorArgs.builder()
.enable(true)
.build());
var exampleOrganizationConfiguration = new OrganizationConfiguration("exampleOrganizationConfiguration", OrganizationConfigurationArgs.builder()
.datasources(OrganizationConfigurationDatasourcesArgs.builder()
.s3Logs(OrganizationConfigurationDatasourcesS3LogsArgs.builder()
.autoEnable(true)
.build())
.kubernetes(OrganizationConfigurationDatasourcesKubernetesArgs.builder()
.auditLogs(OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs.builder()
.enable(true)
.build())
.build())
.malwareProtection(OrganizationConfigurationDatasourcesMalwareProtectionArgs.builder()
.scanEc2InstanceWithFindings(OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs.builder()
.ebsVolumes(OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs.builder()
.autoEnable(true)
.build())
.build())
.build())
.build())
.autoEnableOrganizationMembers("ALL")
.detectorId(example.id())
.build());
}
}
resources:
example:
type: aws:guardduty:Detector
properties:
enable: true
exampleOrganizationConfiguration:
type: aws:guardduty:OrganizationConfiguration
name: example
properties:
datasources:
s3Logs:
autoEnable: true
kubernetes:
auditLogs:
enable: true
malwareProtection:
scanEc2InstanceWithFindings:
ebsVolumes:
autoEnable: true
autoEnableOrganizationMembers: ALL
detectorId: ${example.id}
Import
Using pulumi import, import GuardDuty Organization Configurations using the GuardDuty Detector ID. For example:
$ pulumi import aws:guardduty/organizationConfiguration:OrganizationConfiguration example 00b00fd5aecc0ab60a708659477e9617
Constructors
- OrganizationConfiguration(String name, {OrganizationConfigurationArgs? args, CustomResourceOptions? options})
-
Creates a new OrganizationConfiguration.
nameThe Pulumi resource name.argsArguments used to configure this OrganizationConfiguration. The set of arguments for OrganizationConfiguration.optionsResource options controlling this resource's behavior. - OrganizationConfiguration.reference(String urn)
- Creates a typed reference to an existing OrganizationConfiguration resource.
Properties
-
autoEnableOrganizationMembers
↔ Output<
String> -
Indicates the auto-enablement configuration of GuardDuty for the member accounts in the organization.
Valid values are
ALL,NEW,NONE.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
datasources
↔ Output<
OrganizationConfigurationDatasources> -
Configuration for the collected datasources. Deprecated in favor of
aws.guardduty.OrganizationConfigurationFeatureresources.latefinal -
detectorId
↔ Output<
String> -
The detector ID of the GuardDuty account.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {OrganizationConfigurationState? state, CustomResourceOptions? options}) → OrganizationConfiguration -
Gets an existing OrganizationConfiguration resource's state with the given
nameandid.