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

resource/aws_sns_topic_subscription: Handle read-after-create eventual consistency, enforce lowercase protocol argument validation #18475

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 30, 2021

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 #10225
Closes #11737
Closes #12692
Closes #16695
Reference: #16796

The protocol validation update is to catch where the API accepts uppercase values such as HTTPS, but prevents proper handling when the API canonicalizes it to lowercase. The API documentation and existing Terraform documentation solely use lowercase.

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (95.60s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (137.43s)
--- PASS: TestAccAWSSNSTopicSubscription_basic (66.20s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (69.55s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (74.02s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (75.13s)
--- PASS: TestAccAWSSNSTopicSubscription_email (16.78s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (71.62s)
--- PASS: TestAccAWSSNSTopicSubscription_firehose (140.29s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (69.77s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (64.88s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSSNSTopicSubscription_basic (70.13s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (106.45s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (82.09s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (68.14s)
--- PASS: TestAccAWSSNSTopicSubscription_email (20.04s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (106.32s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (95.36s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (110.75s)
--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (1.41s)
--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (1.41s)
--- SKIP: TestAccAWSSNSTopicSubscription_firehose (53.36s)

…l consistency, enforce lowercase protocol argument validation

Reference: #10225
Reference: #11737
Reference: #12692
Reference: #16695
Reference: #16796

The `protocol` validation update is to catch where the API accepts uppercase values such as `HTTPS`, but prevents proper handling when the API canonicalizes it to lowercase. The API documentation and existing Terraform documentation solely use lowercase.

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (95.60s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (137.43s)
--- PASS: TestAccAWSSNSTopicSubscription_basic (66.20s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (69.55s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (74.02s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (75.13s)
--- PASS: TestAccAWSSNSTopicSubscription_email (16.78s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (71.62s)
--- PASS: TestAccAWSSNSTopicSubscription_firehose (140.29s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (69.77s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (64.88s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSSNSTopicSubscription_basic (70.13s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (106.45s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (82.09s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (68.14s)
--- PASS: TestAccAWSSNSTopicSubscription_email (20.04s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (106.32s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (95.36s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (110.75s)
--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (1.41s)
--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (1.41s)
--- SKIP: TestAccAWSSNSTopicSubscription_firehose (53.36s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Mar 30, 2021
@bflad bflad requested a review from a team as a code owner March 30, 2021 00:30
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/sns Issues and PRs that pertain to the sns service. labels Mar 30, 2021
@YakDriver YakDriver self-assigned this Mar 30, 2021
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.

Looks great! 🎉

Acceptance tests in commercial (us-west-2):

--- PASS: TestAccAWSSNSTopicSubscription_email (17.13s)
--- PASS: TestAccAWSSNSTopicSubscription_basic (65.46s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (67.27s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (67.62s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (67.71s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (71.02s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (72.42s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (74.22s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (90.38s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (124.65s)
--- PASS: TestAccAWSSNSTopicSubscription_firehose (129.62s)

Acceptance tests in GovCloud:

--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (1.23s)
--- SKIP: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (1.24s)
--- PASS: TestAccAWSSNSTopicSubscription_email (20.31s)
--- PASS: TestAccAWSSNSTopicSubscription_redrivePolicy (58.91s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (64.65s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (65.24s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (65.29s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears_topic (68.05s)
--- SKIP: TestAccAWSSNSTopicSubscription_firehose (69.61s)
--- PASS: TestAccAWSSNSTopicSubscription_basic (70.51s)
--- PASS: TestAccAWSSNSTopicSubscription_disappears (76.44s)

@bflad bflad merged commit 364ecfe into main Mar 30, 2021
@bflad bflad deleted the b-aws_sns_topic_subscription-IsNewResource branch March 30, 2021 18:11
@github-actions github-actions bot added this to the v3.35.0 milestone Mar 30, 2021
github-actions bot pushed a commit that referenced this pull request Mar 30, 2021
@ghost
Copy link

ghost commented Apr 1, 2021

This has been released in version 3.35.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 for triage. Thanks!

@ghost
Copy link

ghost commented Apr 30, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/sns Issues and PRs that pertain to the sns service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
2 participants