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 Account #19069

Merged
merged 18 commits into from
Apr 29, 2021
Merged

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Apr 22, 2021

Added a new resource, docs and tests for Macie2 Account called aws_macie2_account

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=TestAccAwsMacie2Account_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsMacie2Account_ -timeout 180m
=== RUN   TestAccAwsMacie2Account_basic
--- PASS: TestAccAwsMacie2Account_basic (22.16s)
=== RUN   TestAccAwsMacie2Account_WithFinding
--- PASS: TestAccAwsMacie2Account_WithFinding (32.91s)
=== RUN   TestAccAwsMacie2Account_WithStatus
--- PASS: TestAccAwsMacie2Account_WithStatus (34.18s)
=== RUN   TestAccAwsMacie2Account_WithFindingAndStatus
--- PASS: TestAccAwsMacie2Account_WithFindingAndStatus (33.48s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       122.778s

@coderGo93 coderGo93 requested a review from a team as a code owner April 22, 2021 21:08
@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 Apr 22, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 22, 2021
@github-actions
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @coderGo93 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@gdavison gdavison self-assigned this Apr 22, 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.

Hi @coderGo93, thanks for the PR. I have a number of changes we'd like to see. Some of them should have been caught by our linting tools, but it looks like the merge conflict prevented them from running.

We have a lot of documentation for contributing to the AWS provider located at https://github.com/hashicorp/terraform-provider-aws/tree/main/docs/contributing. Due to the age and size of the AWS provider, we have some older resources that don't necessarily follow the latest guidelines, so the documentation is a better guide than some of the existing resources.

aws/provider.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account_test.go Outdated Show resolved Hide resolved
aws/resource_aws_macie2_account_test.go Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison April 26, 2021 22:53
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.

Hi @coderGo93, thanks for making the updates. I've added a few new comments, plus there are a number of changes left from the last review. In the cases where I've suggested an edit, you can apply them directly from GitHub or manually in your editor.

aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
website/allowed-subcategories.txt Outdated Show resolved Hide resolved
website/docs/r/macie2_account.html.markdown Outdated Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison April 27, 2021 20:34
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, @coderGo93! One more note about error handling on deletion, and we'll need a changelog file as described at https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/contributing/pullrequest-submission-and-lifecycle.md#changelog-process

aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison April 29, 2021 00:29
@gdavison gdavison removed 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.

It's looking great! One last change that I missed.

aws/resource_aws_macie2_account.go Outdated Show resolved Hide resolved
@coderGo93 coderGo93 requested a review from gdavison April 29, 2021 17:45
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! 🚀

Acceptance test results

--- PASS: TestAccAwsMacie2Account_basic (39.97s)
--- PASS: TestAccAwsMacie2Account_FindingPublishingFrequency (66.07s)
--- PASS: TestAccAwsMacie2Account_WithStatus (69.27s)
--- PASS: TestAccAwsMacie2Account_WithFindingAndStatus (66.89s)
--- PASS: TestAccAwsMacie2Account_disappears (28.31s)

@gdavison gdavison merged commit 3998fe1 into hashicorp:main Apr 29, 2021
@github-actions github-actions bot added this to the v3.38.0 milestone Apr 29, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.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/XL 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