Skip to content

Resource: awsMacie2FindingsFilter

Provides a resource to manage an Amazon Macie Findings Filter.

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", {});
new aws.macie2FindingsFilter.Macie2FindingsFilter(this, "test", {
  action: "ARCHIVE",
  depends_on: ["${aws_macie2_account.test}"],
  description: "DESCRIPTION",
  findingCriteria: {
    criterion: [
      {
        eq: ["${data.aws_region.current.name}"],
        field: "region",
      },
    ],
  },
  name: "NAME OF THE FINDINGS FILTER",
  position: 1,
});

Argument Reference

The following arguments are supported:

  • findingCriteria - (Required) The criteria to use to filter findings.
  • name - (Optional) A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 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 filter. The description can contain as many as 512 characters.
  • action - (Required) The action to perform on findings that meet the filter criteria (findingCriteria). Valid values are: archive, suppress (automatically archive) the findings; and, noop, don't perform any action on the findings.
  • position - (Optional) The position of the filter in the list of saved filters on the Amazon Macie console. This value also determines the order in which the filter is applied to findings, relative to other filters that are also applied to the findings.
  • tags - (Optional) A map of key-value pairs that specifies the tags to associate with the filter.

The findingCriteria object supports the following:

  • criterion - (Optional) A condition that specifies the property, operator, and one or more values to use to filter the results. (documented below)

The criterion object supports the following:

  • field - (Required) The name of the field to be evaluated.
  • eqExactMatch - (Optional) The value for the property exclusively matches (equals an exact match for) all the specified values. If you specify multiple values, Amazon Macie uses AND logic to join the values.
  • eq - (Optional) The value for the property matches (equals) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.
  • neq - (Optional) The value for the property doesn't match (doesn't equal) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.
  • lt - (Optional) The value for the property is less than the specified value.
  • lte - (Optional) The value for the property is less than or equal to the specified value.
  • gt - (Optional) The value for the property is greater than the specified value.
  • gte - (Optional) The value for the property is greater than or equal to the specified value.

Attributes Reference

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

  • id - The unique identifier (ID) of the macie Findings Filter.
  • arn - The Amazon Resource Name (ARN) of the Findings Filter.

Import

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

$ terraform import aws_macie2_findings_filter.example abcd1