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

tests/resource/aws_sns_topic_subscription: Fix Terraform 0.12 syntax #7300

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jan 24, 2019

These changes are backwards compatible with Terraform 0.11. The remaining configuration error requires this upstream issue: hashicorp/terraform#20098

Previous output from Terraform 0.12 acceptance testing:

--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (0.44s)
    testing.go:568: Step 0 error: /opt/teamcity-agent/temp/buildTmp/tf-test250105636/main.tf:25,5-6: Invalid argument name; Argument names must not be quoted.

--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (0.60s)
    testing.go:568: Step 0 error: /opt/teamcity-agent/temp/buildTmp/tf-test092280804/main.tf:26,5-6: Invalid argument name; Argument names must not be quoted.

Output from Terraform 0.12 acceptance testing (additional fixes required upstream in Terraform Provider SDK):

--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (1.70s)
    testing.go:568: Step 0 error: config is invalid: Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_confirm_sns.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (1.70s)
    testing.go:568: Step 0 error: config is invalid: 2 problems:

        - Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_confirm_sns.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.
        - Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_basic_authorizer.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.

These changes are backwards compatible with Terraform 0.11. The remaining configuration error requires this upstream issue: hashicorp/terraform#20098

Previous output from Terraform 0.12 acceptance testing:

```
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (0.44s)
    testing.go:568: Step 0 error: /opt/teamcity-agent/temp/buildTmp/tf-test250105636/main.tf:25,5-6: Invalid argument name; Argument names must not be quoted.

--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (0.60s)
    testing.go:568: Step 0 error: /opt/teamcity-agent/temp/buildTmp/tf-test092280804/main.tf:26,5-6: Invalid argument name; Argument names must not be quoted.
```

Output from Terraform 0.12 acceptance testing (additional fixes required upstream in Terraform Provider SDK):

```
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (1.70s)
    testing.go:568: Step 0 error: config is invalid: Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_confirm_sns.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (1.70s)
    testing.go:568: Step 0 error: config is invalid: 2 problems:

        - Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_confirm_sns.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.
        - Error in function call: Call to function "file" failed: contents of test-fixtures/lambda_basic_authorizer.zip are not valid UTF-8; to read arbitrary bytes, use the filebase64 function instead.
```
@bflad bflad added this to the v2.0.0 milestone Jan 24, 2019
@bflad bflad requested a review from a team January 24, 2019 07:06
@ghost ghost added size/XS 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 Jan 24, 2019
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bflad bflad merged commit 7ef2fd6 into master Jan 24, 2019
@bflad bflad deleted the td-aws_sns_topic_subscription-0.12-syntax branch January 24, 2019 08:13
@bflad bflad modified the milestones: v2.0.0, v2.1.0, v2.2.0 Feb 24, 2019
@bflad bflad modified the milestones: v2.2.0, 0.12-support Mar 14, 2019
@ghost
Copy link

ghost commented Mar 31, 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 Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/sns Issues and PRs that pertain to the sns service. size/XS 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.

2 participants