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

Added a boolean eventbridge attribute to s3/bucket_notification #22045

Merged
merged 6 commits into from
Jan 26, 2022
Merged

Added a boolean eventbridge attribute to s3/bucket_notification #22045

merged 6 commits into from
Jan 26, 2022

Conversation

lparkes
Copy link

@lparkes lparkes commented Dec 3, 2021

Added a boolean eventbridge attribute to s3/bucket_notification in order to support the EventBridge notifications for S3 buckets.

This is a draft PR. IMHO the code looks good and the acceptance test looks good, but I haven't gone through all the contribution document in detail yet. I do have one question right now though. Where/how do I write the documentation for the new attribute I have added?

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

Closes #22013.

Output from acceptance testing:

lloyd@riftsweeper:software/terraform-provider-aws$ AWS_PROFILE=cicd make testacc TESTS=TestAccS3BucketNotification_eventbridge PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketNotification_eventbridge' -timeout 180m
=== RUN   TestAccS3BucketNotification_eventbridge
=== PAUSE TestAccS3BucketNotification_eventbridge
=== CONT  TestAccS3BucketNotification_eventbridge
--- PASS: TestAccS3BucketNotification_eventbridge (36.66s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/s3 36.702s
...

order to support the EventBridge notifications for S3 buckets.
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 3, 2021
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 @lparkes 👋

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! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 7, 2021
@konstankinollc
Copy link

Hi there,

Seems like absolutely required feature. Any prospect on when this can be completed/merged?

Thank you.

@kamilturek
Copy link
Collaborator

Hey @lparkes, you would need to update the documentation in this file. It also might be worthy to create a change log like described here. Please let me know if you need any help.

@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jan 21, 2022
@lparkes
Copy link
Author

lparkes commented Jan 21, 2022

I have added documentaion for the new argument as well as creating a changelog entry. I didn't write an example for the new argument because it's a boolean.
I've also run through Resource Contribution Guidelines checklist.

@davidalecrim
Copy link

Love that you took the time to create this PR @lparkes 🙏
I happen to need this and I added a thumbsup already. Just have one small detail/suggestion, if you replace relates with resolves in the PR description, it will actually add the PR to the original issue, because at the time, it's not linked.

Just resolves #22013, ty!

@lparkes
Copy link
Author

lparkes commented Jan 26, 2022

Love that you took the time to create this PR @lparkes pray I happen to need this and I added a thumbsup already. Just have one small detail/suggestion, if you replace relates with resolves in the PR description, it will actually add the PR to the original issue, because at the time, it's not linked.

Just resolves #22013, ty!

Hi David. If you look very carefully, you will see that I didn't write the relates text. ewbankkit kindly added that, presumably because he had noticed that the issue had been recently created. I checked for an issue of course, but only before I started writing the code which was a couple of days before I created the PR.

Hmm. The HTML comment in the PR template says I should use Closes. Hold on one moment while I read the issue and double check I've got it all sorted.

@YakDriver YakDriver self-assigned this Jan 26, 2022
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jan 26, 2022
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Your changes look great! 🎉 Also, found a few things that were not quite right that needed fixing at the same time.

Output from acceptance tests (us-west-2):

% make testacc TESTS=TestAccS3BucketNotification_ PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketNotification_' -timeout 180m
--- PASS: TestAccS3BucketNotification_eventbridge (26.96s)
--- PASS: TestAccS3BucketNotification_topic (29.84s)
--- PASS: TestAccS3BucketNotification_Topic_multiple (29.99s)
--- PASS: TestAccS3BucketNotification_queue (31.55s)
--- PASS: TestAccS3BucketNotification_lambdaFunction (37.87s)
--- PASS: TestAccS3BucketNotification_LambdaFunctionLambdaFunctionARN_alias (45.48s)
--- PASS: TestAccS3BucketNotification_update (50.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	51.345s

Output from acceptance tests (GovCloud):

% make testacc TESTS=TestAccS3BucketNotification_ PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketNotification_' -timeout 180m
--- SKIP: TestAccS3BucketNotification_eventbridge (15.48s)
--- PASS: TestAccS3BucketNotification_topic (32.93s)
--- PASS: TestAccS3BucketNotification_Topic_multiple (33.08s)
--- PASS: TestAccS3BucketNotification_LambdaFunctionLambdaFunctionARN_alias (40.24s)
--- PASS: TestAccS3BucketNotification_queue (41.50s)
--- PASS: TestAccS3BucketNotification_lambdaFunction (45.22s)
--- PASS: TestAccS3BucketNotification_update (55.08s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	56.296s

@YakDriver YakDriver merged commit 45049d8 into hashicorp:main Jan 26, 2022
@github-actions github-actions bot added this to the v3.74.0 milestone Jan 26, 2022
@lparkes
Copy link
Author

lparkes commented Jan 27, 2022

Sorry for the argument/attribute typo in the changelog. I did check the terminology and I knew "argument" was correct and I still managed to type the wrong word in.
Thanks for merging the PR.

@github-actions
Copy link

This functionality has been released in v3.74.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 25, 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. enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. size/L 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.

Add S3 notifications for EventBridge
6 participants