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: Always set Terraform state on reads, fix filter_policy removal #6023

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Sep 28, 2018

Fixes #1910
Fixes #3328

Changes proposed in this pull request:

Previously (before code updates):

--- FAIL: TestAccAWSSNSTopicSubscription_basic (10.89s)
    testing.go:527: Step 0 error: Check failed: Check 3/8 error: aws_sns_topic_subscription.test_subscription: Attribute 'delivery_policy' not found
--- FAIL: TestAccAWSSNSTopicSubscription_filterPolicy (28.36s)
    testing.go:527: Step 3 error: Error applying: 1 error occurred:
        	* aws_sns_topic_subscription.test_subscription: 1 error occurred:
        	* aws_sns_topic_subscription.test_subscription: error setting subscription (arn:aws:sns:us-west-2:187416307283:terraform-test-topic-7447862065639079919:d0385467-b42a-4018-a22f-cdd19066fe18) attribute (FilterPolicy): InvalidParameter: Invalid parameter: FilterPolicy: Filter is not an object

Output from acceptance testing:

--- PASS: TestAccAWSSNSTopicSubscription_basic (15.92s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (34.20s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (33.09s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (31.41s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (44.73s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (75.19s)

…ads, fix filter_policy removal

Previously (before code updates):

```
--- FAIL: TestAccAWSSNSTopicSubscription_basic (10.89s)
    testing.go:527: Step 0 error: Check failed: Check 3/8 error: aws_sns_topic_subscription.test_subscription: Attribute 'delivery_policy' not found
--- FAIL: TestAccAWSSNSTopicSubscription_filterPolicy (28.36s)
    testing.go:527: Step 3 error: Error applying: 1 error occurred:
        	* aws_sns_topic_subscription.test_subscription: 1 error occurred:
        	* aws_sns_topic_subscription.test_subscription: error setting subscription (arn:aws:sns:us-west-2:187416307283:terraform-test-topic-7447862065639079919:d0385467-b42a-4018-a22f-cdd19066fe18) attribute (FilterPolicy): InvalidParameter: Invalid parameter: FilterPolicy: Filter is not an object
```

Output from acceptance testing:

```
--- PASS: TestAccAWSSNSTopicSubscription_basic (15.92s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (34.20s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (33.09s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (31.41s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (44.73s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (75.19s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Sep 28, 2018
@bflad bflad requested a review from a team September 28, 2018 20:55
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/sns Issues and PRs that pertain to the sns service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 28, 2018
@bflad bflad added this to the v1.39.0 milestone Oct 3, 2018
@bflad bflad merged commit fe4acce into master Oct 3, 2018
@bflad bflad deleted the b-aws_sns_topic_subscription-reads-updates branch October 3, 2018 16:59
bflad added a commit that referenced this pull request Oct 3, 2018
@ghost
Copy link

ghost commented Oct 3, 2018

This has been released in version 1.39.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "aws" {
	version = "~> 1.39.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 3, 2020

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 and limited conversation to collaborators Apr 3, 2020
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/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
2 participants