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 Classification Job #19165

Merged
merged 29 commits into from
May 5, 2021

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Apr 29, 2021

Added a new resource, docs and tests for Macie Classification Job called aws_macie2_classification_job

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=TestAccAwsMacie2ClassificationJob_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsMacie2ClassificationJob_ -timeout 180m
=== RUN   TestAccAwsMacie2ClassificationJob_Name_Generated
--- PASS: TestAccAwsMacie2ClassificationJob_Name_Generated (23.45s)
=== RUN   TestAccAwsMacie2ClassificationJob_NamePrefix
--- PASS: TestAccAwsMacie2ClassificationJob_NamePrefix (21.99s)
=== RUN   TestAccAwsMacie2ClassificationJob_complete
--- PASS: TestAccAwsMacie2ClassificationJob_complete (36.43s)
=== RUN   TestAccAwsMacie2ClassificationJob_WithTags
--- PASS: TestAccAwsMacie2ClassificationJob_WithTags (37.08s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       119.004s

...

@coderGo93 coderGo93 requested a review from a team as a code owner April 29, 2021 19:47
@ghost ghost added size/XXL 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 Apr 29, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 29, 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.

I have a number of suggestions, @coderGo93. Please also include a CHANGELOG entry file.

aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
@gdavison gdavison removed the needs-triage Waiting for first response or review from a maintainer. label May 1, 2021
@gdavison gdavison self-assigned this May 1, 2021
@coderGo93 coderGo93 requested a review from gdavison May 4, 2021 00:57
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 more changes to make and some left from the previous review

aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison May 4, 2021 20:53
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
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.

We're getting there. I have a few additional changes and a few left over from previous reviews.

Also, take a look at https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/contributing/running-and-writing-acceptance-tests.md#acceptance-test-concurrency. Because Macie can be either enabled or disabled, we can only run one Macie test at a time. Take a look at, e.g. https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_guardduty_test.go for examples.

@coderGo93 coderGo93 requested a review from gdavison May 5, 2021 20:01
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.

Looking good. One last change for the acceptance tests.

aws/resource_aws_macie2_classification_job_test.go Outdated Show resolved Hide resolved
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 to me 🚀

--- PASS: TestAccAWSMacie2_serial (257.93s)
--- PASS: TestAccAWSMacie2_serial/Account (91.46s)
--- PASS: TestAccAWSMacie2_serial/Account/finding_and_status (24.43s)
--- PASS: TestAccAWSMacie2_serial/Account/disappears (9.26s)
--- PASS: TestAccAWSMacie2_serial/Account/basic (12.62s)
--- PASS: TestAccAWSMacie2_serial/Account/finding_publishing_frequency (22.90s)
--- PASS: TestAccAWSMacie2_serial/Account/status (22.25s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob (166.48s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/basic (19.51s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/name_generated (18.82s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/name_prefix (17.74s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/disappears (16.34s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/status (31.40s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/complete (31.99s)
--- PASS: TestAccAWSMacie2_serial/ClassificationJob/tags (30.68s)

@gdavison gdavison merged commit 522bd3b into hashicorp:main May 5, 2021
@github-actions github-actions bot added this to the v3.39.0 milestone May 5, 2021
@ghost
Copy link

ghost commented May 7, 2021

This has been released in version 3.39.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

github-actions bot commented Jun 6, 2021

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 6, 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.

2 participants