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

add support for SQS-managed SSE #21954

Merged
merged 5 commits into from
Dec 2, 2021

Conversation

rmorris1218
Copy link
Contributor

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 #21948 -- add support for SSE-SQS for the aws_sqs_queue resource.

Output from acceptance testing:

$ make testacc TESTS=TestAccSQSQueue_encryption PKG=sqs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sqs/... -v -count 1 -parallel 20 -run='TestAccSQSQueue_encryption' -timeout 180m
=== RUN   TestAccSQSQueue_encryption
=== PAUSE TestAccSQSQueue_encryption
=== CONT  TestAccSQSQueue_encryption
--- PASS: TestAccSQSQueue_encryption (116.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sqs	119.555s
...

@github-actions github-actions bot added service/sqs Issues and PRs that pertain to the sqs 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/XS Managed by automation to categorize the size of a PR. labels Nov 29, 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.

@rmorris1218 rmorris1218 marked this pull request as draft November 29, 2021 23:22
@rmorris1218
Copy link
Contributor Author

rmorris1218 commented Nov 29, 2021

This is contingent on the #21939 aws-sdk-go bump to at least v1.42.11 (see here)

@rmorris1218 rmorris1218 changed the title add support for sqs managed sse add support for SQS-managed SSE Nov 30, 2021
@ktham
Copy link
Contributor

ktham commented Nov 30, 2021

What will happen if sqs_managed_sse_enabled is set to true and kms_master_key_id is not empty?

@rmorris1218
Copy link
Contributor Author

If they are both set, received: InvalidAttributeName: You can use one type of server-side encryption (SSE) at one time. You can either enable KMS SSE or SQS SSE. .. I added ConflictsWith constraints for both of those to avoid the error.

@rmorris1218 rmorris1218 marked this pull request as ready for review December 2, 2021 04:24
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Dec 2, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 2, 2021
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 TESTS=TestAccSQSQueue_ PKG=sqs          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sqs/... -v -count 1 -parallel 20 -run='TestAccSQSQueue_' -timeout 180m
=== RUN   TestAccSQSQueue_basic
=== PAUSE TestAccSQSQueue_basic
=== RUN   TestAccSQSQueue_disappears
=== PAUSE TestAccSQSQueue_disappears
=== RUN   TestAccSQSQueue_Name_generated
=== PAUSE TestAccSQSQueue_Name_generated
=== RUN   TestAccSQSQueue_NameGenerated_fifoQueue
=== PAUSE TestAccSQSQueue_NameGenerated_fifoQueue
=== RUN   TestAccSQSQueue_namePrefix
=== PAUSE TestAccSQSQueue_namePrefix
=== RUN   TestAccSQSQueue_NamePrefix_fifoQueue
=== PAUSE TestAccSQSQueue_NamePrefix_fifoQueue
=== RUN   TestAccSQSQueue_tags
=== PAUSE TestAccSQSQueue_tags
=== RUN   TestAccSQSQueue_update
=== PAUSE TestAccSQSQueue_update
=== RUN   TestAccSQSQueue_policy
=== PAUSE TestAccSQSQueue_policy
=== RUN   TestAccSQSQueue_recentlyDeleted
=== PAUSE TestAccSQSQueue_recentlyDeleted
=== RUN   TestAccSQSQueue_redrivePolicy
=== PAUSE TestAccSQSQueue_redrivePolicy
=== RUN   TestAccSQSQueue_fifoQueue
=== PAUSE TestAccSQSQueue_fifoQueue
=== RUN   TestAccSQSQueue_FIFOQueue_expectNameError
=== PAUSE TestAccSQSQueue_FIFOQueue_expectNameError
=== RUN   TestAccSQSQueue_FIFOQueue_contentBasedDeduplication
=== PAUSE TestAccSQSQueue_FIFOQueue_contentBasedDeduplication
=== RUN   TestAccSQSQueue_FIFOQueue_highThroughputMode
=== PAUSE TestAccSQSQueue_FIFOQueue_highThroughputMode
=== RUN   TestAccSQSQueue_StandardQueue_expectContentBasedDeduplicationError
=== PAUSE TestAccSQSQueue_StandardQueue_expectContentBasedDeduplicationError
=== RUN   TestAccSQSQueue_encryption
=== PAUSE TestAccSQSQueue_encryption
=== RUN   TestAccSQSQueue_zeroVisibilityTimeoutSeconds
=== PAUSE TestAccSQSQueue_zeroVisibilityTimeoutSeconds
=== RUN   TestAccSQSQueue_defaultKMSDataKeyReusePeriodSeconds
=== PAUSE TestAccSQSQueue_defaultKMSDataKeyReusePeriodSeconds
=== CONT  TestAccSQSQueue_basic
=== CONT  TestAccSQSQueue_redrivePolicy
=== CONT  TestAccSQSQueue_NamePrefix_fifoQueue
=== CONT  TestAccSQSQueue_Name_generated
=== CONT  TestAccSQSQueue_namePrefix
=== CONT  TestAccSQSQueue_tags
=== CONT  TestAccSQSQueue_disappears
=== CONT  TestAccSQSQueue_defaultKMSDataKeyReusePeriodSeconds
=== CONT  TestAccSQSQueue_zeroVisibilityTimeoutSeconds
=== CONT  TestAccSQSQueue_encryption
=== CONT  TestAccSQSQueue_StandardQueue_expectContentBasedDeduplicationError
=== CONT  TestAccSQSQueue_FIFOQueue_highThroughputMode
=== CONT  TestAccSQSQueue_FIFOQueue_contentBasedDeduplication
=== CONT  TestAccSQSQueue_FIFOQueue_expectNameError
=== CONT  TestAccSQSQueue_NameGenerated_fifoQueue
=== CONT  TestAccSQSQueue_fifoQueue
=== CONT  TestAccSQSQueue_policy
=== CONT  TestAccSQSQueue_recentlyDeleted
=== CONT  TestAccSQSQueue_update
--- PASS: TestAccSQSQueue_StandardQueue_expectContentBasedDeduplicationError (7.27s)
--- PASS: TestAccSQSQueue_FIFOQueue_expectNameError (7.88s)
--- PASS: TestAccSQSQueue_disappears (30.97s)
--- PASS: TestAccSQSQueue_basic (42.31s)
--- PASS: TestAccSQSQueue_zeroVisibilityTimeoutSeconds (42.70s)
--- PASS: TestAccSQSQueue_namePrefix (42.87s)
--- PASS: TestAccSQSQueue_defaultKMSDataKeyReusePeriodSeconds (43.04s)
--- PASS: TestAccSQSQueue_NameGenerated_fifoQueue (43.04s)
--- PASS: TestAccSQSQueue_Name_generated (43.04s)
--- PASS: TestAccSQSQueue_fifoQueue (43.25s)
--- PASS: TestAccSQSQueue_NamePrefix_fifoQueue (43.35s)
--- PASS: TestAccSQSQueue_FIFOQueue_contentBasedDeduplication (43.35s)
--- PASS: TestAccSQSQueue_redrivePolicy (45.12s)
--- PASS: TestAccSQSQueue_FIFOQueue_highThroughputMode (55.73s)
--- PASS: TestAccSQSQueue_update (56.09s)
--- PASS: TestAccSQSQueue_tags (64.29s)
--- PASS: TestAccSQSQueue_encryption (66.22s)
--- PASS: TestAccSQSQueue_policy (80.43s)
--- PASS: TestAccSQSQueue_recentlyDeleted (88.25s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sqs	92.055s

@ewbankkit
Copy link
Contributor

@rmorris1218 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit bd98d1e into hashicorp:main Dec 2, 2021
@github-actions github-actions bot added this to the v3.69.0 milestone Dec 2, 2021
@github-actions
Copy link

This functionality has been released in v3.69.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 Jun 3, 2022

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 3, 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/sqs Issues and PRs that pertain to the sqs service. size/S 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 support for SSE-SQS
3 participants