hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

[New Resource]: aws_macie2_allow_list #27595

Open timhaley94 opened 2 years ago

timhaley94 commented 2 years ago

Description

A feature that Amazon Macie provides is the concept of an "allow list". Macie is a service which scans S3 objects in order to find data that shouldn't be there like user generated content (UGC) and personal data (PD/PII). The idea of the allow list is to allow specific values, specified by regular expression, that should always be considered safe.

For example, perhaps you want to find emails in your S3 bucket but you want to ignore foo@test.com.

My team at Trello uses Macie to detect sensitive data and we configure Macie using Terraform. We have started utilizing allow lists, however, we need to configure them manually in the console because no Terraform resource exists. The equivalent AWS API endpoint and function in the Go SDK exist already.

Requested Resource(s) and/or Data Source(s)

Resource name: aws_macie2_allow_list Attributes (just taken from the AWS API docs):

Either regex or word_list_bucket_name and word_list_object_key would be required both options should not be present. regex allows you to allow list values via regex and word_list_bucket_name/word_list_object_key let's you provide a plain text file of delimited literal values which should be ignored.

aws_macie2_allow_list is a confusing name here since it implies a list not an entry, but that's what is used in the AWS documentation so aligning the terraform resource with it makes sense.

Potential Terraform Configuration

resource "aws_macie2_allow_list" "tester_email" {
  name        = "Tester Email"
  description = "We use this email for testing, so it shouldn't be considered PII"
  regex       = "foo@test.com"

  depends_on  = [aws_macie2_account.main]
}

References

The equivalent AWS API endpoint. The equivalent function in the Go SDK.

Would you like to implement a fix?

Yes

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

Gert25 commented 2 months ago

Any update on when this feature will be prioritized?