Skip to content

Resource: awsMacie2ClassificationExportConfiguration

Provides a resource to manage an Amazon Macie Classification Export Configuration.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsMacie2AccountExample = new aws.macie2Account.Macie2Account(
  this,
  "example",
  {}
);
const awsMacie2ClassificationExportConfigurationExample =
  new aws.macie2ClassificationExportConfiguration.Macie2ClassificationExportConfiguration(
    this,
    "example_1",
    {
      depends_on: [`\${${awsMacie2AccountExample.fqn}}`],
      s3Destination: {
        bucketName: "${aws_s3_bucket.example.bucket}",
        keyPrefix: "exampleprefix/",
        kmsKeyArn: "${aws_kms_key.example.arn}",
      },
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsMacie2ClassificationExportConfigurationExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • s3Destination - (Required) Configuration block for a S3 Destination. Defined below

s3_destination Configuration Block

The s3Destination configuration block supports the following arguments:

  • bucketName - (Required) The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
  • keyPrefix - (Optional) The object key for the bucket in which Amazon Macie exports the data classification results.
  • kmsKeyArn - (Required) Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The unique identifier (ID) of the configuration.

Import

awsMacie2ClassificationExportConfiguration can be imported using the account ID and region, e.g.,

$ terraform import aws_macie2_classification_export_configuration.example 123456789012:us-west-2