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 Detective Member and Invitation Accepter #22163

Merged
merged 17 commits into from
Jan 19, 2022

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Dec 10, 2021

Added a new resource, doc and tests for Detective Member called aws_detective_member and Detective Invitation Accepter called aws_detective_invitation_accepter

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 #11672

Output from acceptance testing:

Detective Member

$  make testacc TESTARGS='-run=TestAccDetective_serial' PKG_NAME=internal/service/detective
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/detective/... -v -count 1 -parallel 20 -run=TestAccDetective_serial -timeout 180m
=== RUN   TestAccDetective_serial
=== RUN   TestAccDetective_serial/InvitationAccepter
=== RUN   TestAccDetective_serial/InvitationAccepter/basic
=== RUN   TestAccDetective_serial/Member
=== RUN   TestAccDetective_serial/Member/invitationMessage
=== RUN   TestAccDetective_serial/Member/basic
=== RUN   TestAccDetective_serial/Member/disappear
=== RUN   TestAccDetective_serial/Graph
=== RUN   TestAccDetective_serial/Graph/tags
=== RUN   TestAccDetective_serial/Graph/basic
=== RUN   TestAccDetective_serial/Graph/disappears
--- PASS: TestAccDetective_serial (219.08s)
    --- PASS: TestAccDetective_serial/InvitationAccepter (33.86s)
        --- PASS: TestAccDetective_serial/InvitationAccepter/basic (33.86s)
    --- PASS: TestAccDetective_serial/Member (98.99s)
        --- PASS: TestAccDetective_serial/Member/invitationMessage (45.33s)
        --- PASS: TestAccDetective_serial/Member/basic (28.79s)
        --- PASS: TestAccDetective_serial/Member/disappear (24.87s)
    --- PASS: TestAccDetective_serial/Graph (86.23s)
        --- PASS: TestAccDetective_serial/Graph/tags (50.77s)
        --- PASS: TestAccDetective_serial/Graph/basic (20.61s)
        --- PASS: TestAccDetective_serial/Graph/disappears (14.85s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/detective  221.339s

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/detective Issues and PRs that pertain to the detective service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. labels Dec 10, 2021
@justinretzolk justinretzolk added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 10, 2021
@zhelding zhelding self-requested a review December 13, 2021 18:36
Copy link
Contributor

@zhelding zhelding left a comment

Choose a reason for hiding this comment

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

Thanks for this next set of Detective resources @coderGo93! I've gone ahead and made a number of comments + suggestions -- mostly small in scope.

However, we do require one larger change: namely, the acceptance tests here need to be converted to run serially and not concurrently -- due to the AWS restriction of one graph per account per region. You've gotten around that restriction so far by running one test at a time, but for robustness we really want that restriction built in to the tests.

Luckily, converting tests to be run serially is pretty straightforward: just follow this short guide on acceptance test concurrency to rearrange your test functions.

Related: this means we only need one set of environmental variables instead of two!

Looking forward to your further contributions and getting this merged!

internal/service/detective/find.go Outdated Show resolved Hide resolved
internal/service/detective/member.go Outdated Show resolved Hide resolved
internal/service/detective/member.go Outdated Show resolved Hide resolved
internal/service/detective/member.go Show resolved Hide resolved
internal/service/detective/member.go Outdated Show resolved Hide resolved
website/docs/r/detective_invitation_accepter.html.markdown Outdated Show resolved Hide resolved
website/docs/r/detective_invitation_accepter.html.markdown Outdated Show resolved Hide resolved
website/docs/r/detective_invitation_accepter.html.markdown Outdated Show resolved Hide resolved
website/docs/r/detective_member.html.markdown Outdated Show resolved Hide resolved
website/docs/r/detective_invitation_accepter.html.markdown Outdated Show resolved Hide resolved
@github-actions github-actions bot added the client-connections Pertains to the AWS Client and service connections. label Dec 21, 2021
@coderGo93 coderGo93 requested a review from zhelding December 21, 2021 21:09
@github-actions github-actions bot removed the client-connections Pertains to the AWS Client and service connections. label Jan 18, 2022
@zhelding
Copy link
Contributor

Hi @coderGo93! I've just pushed a number of small final changes and confirmed that we're clearing acceptance tests (see below).

It's rather late here -- so I'm going to call it a night for now; will look at with fresh eyes in the morning and hopefully merge then!

Thanks so much for your patience.

❯ make testacc PKG=detective
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/detective/... -v -count 1 -parallel 20  -timeout 180m
=== RUN   TestAccDetective_serial
=== RUN   TestAccDetective_serial/Graph
=== RUN   TestAccDetective_serial/Graph/basic
=== RUN   TestAccDetective_serial/Graph/disappears
=== RUN   TestAccDetective_serial/Graph/tags
=== RUN   TestAccDetective_serial/InvitationAccepter
=== RUN   TestAccDetective_serial/InvitationAccepter/basic
=== RUN   TestAccDetective_serial/Member
=== RUN   TestAccDetective_serial/Member/basic
=== RUN   TestAccDetective_serial/Member/disappear
=== RUN   TestAccDetective_serial/Member/message
--- PASS: TestAccDetective_serial (139.71s)
    --- PASS: TestAccDetective_serial/Graph (57.22s)
        --- PASS: TestAccDetective_serial/Graph/basic (14.37s)
        --- PASS: TestAccDetective_serial/Graph/disappears (9.66s)
        --- PASS: TestAccDetective_serial/Graph/tags (33.20s)
    --- PASS: TestAccDetective_serial/InvitationAccepter (20.29s)
        --- PASS: TestAccDetective_serial/InvitationAccepter/basic (20.29s)
    --- PASS: TestAccDetective_serial/Member (62.20s)
        --- PASS: TestAccDetective_serial/Member/basic (17.94s)
        --- PASS: TestAccDetective_serial/Member/disappear (15.64s)
        --- PASS: TestAccDetective_serial/Member/message (28.62s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/detective  139.754s

@zhelding zhelding merged commit 5764af9 into hashicorp:main Jan 19, 2022
@github-actions github-actions bot added this to the v3.73.0 milestone Jan 19, 2022
@github-actions
Copy link

This functionality has been released in v3.73.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. Thank you!

@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 May 26, 2022
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/detective Issues and PRs that pertain to the detective 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.

3 participants