Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New resource for Macie2 Findings Filter #19283

Merged
merged 18 commits into from
May 10, 2021

Conversation

coderGo93
Copy link
Contributor

Added a new resource, docs and tests for Macie Findings Filter called aws_macie2_findings_filter

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #13432

Output from acceptance testing:

$  make testacc TESTARGS='-run=TestAccAWSMacie2_serial/FindingsFilter'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSMacie2_serial/FindingsFilter -timeout 180m
=== RUN   TestAccAWSMacie2_serial
=== RUN   TestAccAWSMacie2_serial/FindingsFilter
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/basic
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/name_generated
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/name_prefix
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/disappears
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/complete
=== RUN   TestAccAWSMacie2_serial/FindingsFilter/tags
--- PASS: TestAccAWSMacie2_serial (158.20s)
    --- PASS: TestAccAWSMacie2_serial/FindingsFilter (158.20s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/basic (23.90s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/name_generated (21.83s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/name_prefix (21.53s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/disappears (16.42s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/complete (37.22s)
        --- PASS: TestAccAWSMacie2_serial/FindingsFilter/tags (37.30s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       158.253s

...

@coderGo93 coderGo93 requested a review from a team as a code owner May 7, 2021 21:40
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 7, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 7, 2021
@gdavison gdavison removed the needs-triage Waiting for first response or review from a maintainer. label May 7, 2021
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few tweaks to the documentation and adding date time values to the greater-than and less-than checks.

aws/resource_aws_macie2_findings_filter.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_findings_filter_test.go Outdated Show resolved Hide resolved
website/docs/r/macie2_findings_filter.html.markdown Outdated Show resolved Hide resolved
website/docs/r/macie2_findings_filter.html.markdown Outdated Show resolved Hide resolved
website/docs/r/macie2_findings_filter.html.markdown Outdated Show resolved Hide resolved
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels May 9, 2021
@coderGo93 coderGo93 requested a review from gdavison May 9, 2021 00:27
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good. A couple minor changes

aws/resource_aws_macie2_findings_filter.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_findings_filter.go Outdated Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison May 10, 2021 18:35
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I missed last time. Looking good!

var err error
input.FindingCriteria, err = expandFindingCriteriaFilter(d.Get("finding_criteria").([]interface{}))
if err != nil {
return diag.FromErr(err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this one last time: this should have some context for the error as well

@coderGo93 coderGo93 requested a review from gdavison May 10, 2021 21:56
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀

--- PASS: TestAccAWSMacie2_serial (515.89s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter (152.81s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/date (23.28s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/number (25.25s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/tags (14.43s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/basic (15.35s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/name_generated (13.99s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/name_prefix (14.42s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/disappears (10.11s)
--- PASS: TestAccAWSMacie2_serial/FindingsFilter/complete (35.98s)

@gdavison gdavison merged commit d407e33 into hashicorp:main May 10, 2021
@github-actions github-actions bot added this to the v3.40.0 milestone May 10, 2021
@ghost
Copy link

ghost commented May 13, 2021

This has been released in version 3.40.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. size/XXL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants