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

inspector: Add support for SNS subscriptions #26334

Merged
merged 2 commits into from
Aug 17, 2022
Merged

inspector: Add support for SNS subscriptions #26334

merged 2 commits into from
Aug 17, 2022

Conversation

zhelding
Copy link
Contributor

Adds support to enable SNS topic subscriptions to specific assessment template events.

Supersedes #12261.
Resolves #843.

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

Output from acceptance testing:

❯ make testacc TESTS=TestAccInspectorAssessmentTemplate PKG=inspector
--- PASS: TestAccInspectorAssessmentTemplate_disappears (21.28s)
--- PASS: TestAccInspectorAssessmentTemplate_basic (22.17s)
--- PASS: TestAccInspectorAssessmentTemplate_eventSubscription (50.69s)
--- PASS: TestAccInspectorAssessmentTemplate_tags (55.04s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/inspector  55.091s

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/inspector Issues and PRs that pertain to the inspector service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Aug 16, 2022
This squashed commit contains the following implementation steps:
- Fill out resource schema
- Add expand functions to Create function
- Add Subscription finder function
- Add flatten function to Read function
- Add Update function calls
- Add passing acceptance tests
- Run terrafmt
- Add documentation
@zhelding zhelding self-assigned this Aug 16, 2022
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=TestAccInspectorAssessmentTemplate_' PKG=inspector ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/inspector/... -v -count 1 -parallel 2  -run=TestAccInspectorAssessmentTemplate_ -timeout 180m
=== RUN   TestAccInspectorAssessmentTemplate_basic
=== PAUSE TestAccInspectorAssessmentTemplate_basic
=== RUN   TestAccInspectorAssessmentTemplate_disappears
=== PAUSE TestAccInspectorAssessmentTemplate_disappears
=== RUN   TestAccInspectorAssessmentTemplate_tags
=== PAUSE TestAccInspectorAssessmentTemplate_tags
=== RUN   TestAccInspectorAssessmentTemplate_eventSubscription
=== PAUSE TestAccInspectorAssessmentTemplate_eventSubscription
=== CONT  TestAccInspectorAssessmentTemplate_basic
=== CONT  TestAccInspectorAssessmentTemplate_tags
--- PASS: TestAccInspectorAssessmentTemplate_basic (23.29s)
=== CONT  TestAccInspectorAssessmentTemplate_eventSubscription
--- PASS: TestAccInspectorAssessmentTemplate_tags (67.62s)
=== CONT  TestAccInspectorAssessmentTemplate_disappears
--- PASS: TestAccInspectorAssessmentTemplate_eventSubscription (58.09s)
--- PASS: TestAccInspectorAssessmentTemplate_disappears (17.57s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/inspector	90.237s

@zhelding zhelding merged commit 8a7e503 into hashicorp:main Aug 17, 2022
@zhelding zhelding deleted the f-aws_inspector_sns branch August 17, 2022 21:22
@github-actions github-actions bot added this to the v4.27.0 milestone Aug 17, 2022
@github-actions
Copy link

This functionality has been released in v4.27.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 Sep 19, 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. service/inspector Issues and PRs that pertain to the inspector 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.

Aws_inspector_assessment_template ability to send findings to SNS topic.
2 participants