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: aws_auditmanager_control #27857

Merged
merged 11 commits into from Dec 8, 2022
Merged

New Resource: aws_auditmanager_control #27857

merged 11 commits into from Dec 8, 2022

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Nov 17, 2022

Description

aws_auditmanager_control will allow practitioners to manage custom controls.

Relations

Relates #17981
Depends on #28119

Output from Acceptance Testing

$ make testacc PKG=auditmanager TESTS=TestAccAuditManagerControl_ ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/auditmanager/... -v -count 1 -parallel 3 -run='TestAccAuditManagerControl_'  -timeout 180m
=== RUN   TestAccAuditManagerControl_basic
=== PAUSE TestAccAuditManagerControl_basic
=== RUN   TestAccAuditManagerControl_disappears
=== PAUSE TestAccAuditManagerControl_disappears
=== RUN   TestAccAuditManagerControl_tags
=== PAUSE TestAccAuditManagerControl_tags
=== RUN   TestAccAuditManagerControl_optional
=== PAUSE TestAccAuditManagerControl_optional
=== RUN   TestAccAuditManagerControl_optionalSources
=== PAUSE TestAccAuditManagerControl_optionalSources
=== CONT  TestAccAuditManagerControl_basic
=== CONT  TestAccAuditManagerControl_optional
=== CONT  TestAccAuditManagerControl_tags
--- PASS: TestAccAuditManagerControl_basic (14.46s)
=== CONT  TestAccAuditManagerControl_disappears
--- PASS: TestAccAuditManagerControl_optional (23.22s)
=== CONT  TestAccAuditManagerControl_optionalSources
--- PASS: TestAccAuditManagerControl_disappears (9.49s)
--- PASS: TestAccAuditManagerControl_tags (31.76s)
--- PASS: TestAccAuditManagerControl_optionalSources (21.49s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/auditmanager       47.599s

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. generators Relates to code generators. provider Pertains to the provider itself, rather than any interaction with AWS. service/auditmanager Issues and PRs that pertain to the auditmanager service. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 17, 2022
@jar-b jar-b force-pushed the f-aws_auditmanager_control branch 2 times, most recently from d89cf76 to 79262b2 Compare November 17, 2022 20:12
@jar-b jar-b marked this pull request as ready for review November 17, 2022 20:37
@jar-b jar-b marked this pull request as draft November 17, 2022 21:14
@jar-b
Copy link
Member Author

jar-b commented Nov 17, 2022

Converting back to draft to investigate use of plugin framework with computed set attributes.

@github-actions github-actions bot added the flex Pertains to FLatteners and EXpanders. label Nov 23, 2022
@jar-b jar-b force-pushed the f-aws_auditmanager_control branch 2 times, most recently from b472e13 to cd1bc87 Compare November 28, 2022 18:32
@jar-b jar-b mentioned this pull request Nov 30, 2022
13 tasks
@jar-b jar-b force-pushed the f-aws_auditmanager_control branch 2 times, most recently from 9ec5a16 to e5fbef2 Compare December 5, 2022 21:18
@github-actions github-actions bot removed the client-connections Pertains to the AWS Client and service connections. label Dec 5, 2022
@jar-b jar-b marked this pull request as ready for review December 5, 2022 21:49
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccAuditManagerControl_' PKG=auditmanager ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/auditmanager/... -v -count 1 -parallel 3  -run=TestAccAuditManagerControl_ -timeout 180m
=== RUN   TestAccAuditManagerControl_basic
=== PAUSE TestAccAuditManagerControl_basic
=== RUN   TestAccAuditManagerControl_disappears
=== PAUSE TestAccAuditManagerControl_disappears
=== RUN   TestAccAuditManagerControl_tags
=== PAUSE TestAccAuditManagerControl_tags
=== RUN   TestAccAuditManagerControl_optional
=== PAUSE TestAccAuditManagerControl_optional
=== RUN   TestAccAuditManagerControl_optionalSources
=== PAUSE TestAccAuditManagerControl_optionalSources
=== CONT  TestAccAuditManagerControl_basic
=== CONT  TestAccAuditManagerControl_optional
=== CONT  TestAccAuditManagerControl_optionalSources
--- PASS: TestAccAuditManagerControl_basic (18.63s)
=== CONT  TestAccAuditManagerControl_tags
--- PASS: TestAccAuditManagerControl_optional (28.74s)
=== CONT  TestAccAuditManagerControl_disappears
--- PASS: TestAccAuditManagerControl_optionalSources (28.87s)
--- PASS: TestAccAuditManagerControl_disappears (11.25s)
--- PASS: TestAccAuditManagerControl_tags (37.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/auditmanager	60.287s

@ewbankkit
Copy link
Contributor

=== CONT  TestAccAuditManagerControl_basic
    control_test.go:26: Step 1/2 error: Error running apply: exit status 1
        
        Error: creating AWS Audit Manager Control ("tf-acc-test-1446615365004453142")
        
          with aws_auditmanager_control.test,
          on terraform_plugin_test.tf line 2, in resource "aws_auditmanager_control" "test":
           2: resource "aws_auditmanager_control" "test" {
        
        operation error AuditManager: CreateControl, https response error StatusCode:
        403, RequestID: 500bb232-592c-4797-9c59-856d4ab2c31f, AccessDeniedException:
        Please complete AWS Audit Manager setup from home page to enable this action
        in this account.
--- FAIL: TestAccAuditManagerControl_optionalSources (7.31s)

can be fixed by

% aws auditmanager register-account
{
    "status": "ACTIVE"
}

Maybe we need an aws_auditmanager_account_registration (or similar) resource?

@jar-b
Copy link
Member Author

jar-b commented Dec 8, 2022

Maybe we need an aws_auditmanager_account_registration (or similar) resource?

This is planned for a future phase, but I missed adding it to the original issue. It's been included now, and I may implement it sooner since this service is opt-in.

@jar-b jar-b merged commit ffec8b6 into main Dec 8, 2022
@jar-b jar-b deleted the f-aws_auditmanager_control branch December 8, 2022 16:14
@github-actions github-actions bot added this to the v4.46.0 milestone Dec 8, 2022
github-actions bot pushed a commit that referenced this pull request Dec 8, 2022
@github-actions
Copy link

github-actions bot commented Dec 8, 2022

This functionality has been released in v4.46.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

github-actions bot commented Jan 8, 2023

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 Jan 8, 2023
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. flex Pertains to FLatteners and EXpanders. generators Relates to code generators. provider Pertains to the provider itself, rather than any interaction with AWS. service/auditmanager Issues and PRs that pertain to the auditmanager service. size/XL Managed by automation to categorize the size of a PR. tags Pertains to resource tagging. 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