Skip to content

Resource: awsMacie2CustomDataIdentifier

Provides a resource to manage an AWS Macie Custom Data Identifier.

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";
new aws.macie2Account.Macie2Account(this, "example", {});
const awsMacie2CustomDataIdentifierExample =
  new aws.macie2CustomDataIdentifier.Macie2CustomDataIdentifier(
    this,
    "example_1",
    {
      depends_on: ["${aws_macie2_account.test}"],
      description: "DESCRIPTION",
      ignoreWords: ["ignore"],
      keywords: ["keyword"],
      maximumMatchDistance: 10,
      name: "NAME OF CUSTOM DATA IDENTIFIER",
      regex: "[0-9]{3}-[0-9]{2}-[0-9]{4}",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsMacie2CustomDataIdentifierExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • regex - (Optional) The regular expression (regex) that defines the pattern to match. The expression can contain as many as 512 characters.
  • keywords - (Optional) An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3 - 90 characters. Keywords aren't case sensitive.
  • ignoreWords - (Optional) An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4 - 90 characters. Ignore words are case sensitive.
  • name - (Optional) A custom name for the custom data identifier. The name can contain as many as 128 characters. If omitted, Terraform will assign a random, unique name. Conflicts with namePrefix.
  • namePrefix - (Optional) Creates a unique name beginning with the specified prefix. Conflicts with name.
  • description - (Optional) A custom description of the custom data identifier. The description can contain as many as 512 characters.
  • maximumMatchDistance - (Optional) The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1 - 300 characters. The default value is 50.
  • tags - (Optional) A map of key-value pairs that specifies the tags to associate with the custom data identifier.

Attributes Reference

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

  • id - The unique identifier (ID) of the macie custom data identifier.
  • deleted - Specifies whether the custom data identifier was deleted. If you delete a custom data identifier, Amazon Macie doesn't delete it permanently. Instead, it soft deletes the identifier.
  • createdAt - The date and time, in UTC and extended RFC 3339 format, when the Amazon Macie account was created.
  • arn - The Amazon Resource Name (ARN) of the custom data identifier.

Import

awsMacie2CustomDataIdentifier can be imported using the id, e.g.,

$ terraform import aws_macie2_custom_data_identifier.example abcd1