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_db_event_subscription: Fix tag ARN handling #4151

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 10, 2018

Additional updates:

  • Add arn attribute
  • Support configurable timeouts
  • Use isAWSErr()
  • Skip returning an error when deleting a non-existent subscription

The regression occurred during #4053, which was merged in for release in v1.14.0 of the AWS provider.

Fixes #4138 and the following testing:

=== RUN   TestAccAWSDBEventSubscription_basicUpdate
--- FAIL: TestAccAWSDBEventSubscription_basicUpdate (168.94s)
    testing.go:518: Step 0 error: Check failed: Check 5/5 error: aws_db_event_subscription.bar: Attribute 'tags.Name' not found

=== RUN   TestAccAWSDBEventSubscription_categoryUpdate
--- FAIL: TestAccAWSDBEventSubscription_categoryUpdate (617.09s)
    testing.go:518: Step 0 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_db_event_subscription.bar
          tags.%:    "0" => "1"
          tags.Name: "" => "name"

=== RUN   TestAccAWSDBEventSubscription_importBasic
--- FAIL: TestAccAWSDBEventSubscription_importBasic (769.86s)
    testing.go:518: Step 0 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_db_event_subscription.bar
          tags.%:    "0" => "1"
          tags.Name: "" => "name"

=== RUN   TestAccAWSDBEventSubscription_withSourceIds
--- FAIL: TestAccAWSDBEventSubscription_withSourceIds (166.35s)
    testing.go:518: Step 0 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_db_event_subscription.bar
          tags.%:    "0" => "1"
          tags.Name: "" => "name"
4 tests passed (all tests)
=== RUN   TestAccAWSDBEventSubscription_importBasic
--- PASS: TestAccAWSDBEventSubscription_importBasic (750.01s)
=== RUN   TestAccAWSDBEventSubscription_withSourceIds
--- PASS: TestAccAWSDBEventSubscription_withSourceIds (755.63s)
=== RUN   TestAccAWSDBEventSubscription_basicUpdate
--- PASS: TestAccAWSDBEventSubscription_basicUpdate (1235.63s)
=== RUN   TestAccAWSDBEventSubscription_categoryUpdate
--- PASS: TestAccAWSDBEventSubscription_categoryUpdate (1235.67s)

Additional updates:
* Add arn attribute
* Support configurable timeouts
@bflad bflad added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/rds Issues and PRs that pertain to the rds service. labels Apr 10, 2018
@bflad bflad added this to the v1.14.1 milestone Apr 10, 2018
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Apr 10, 2018
@bflad bflad requested a review from a team April 10, 2018 18:11
Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

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

👍 1 nitpick, leave if you'd like

return fmt.Errorf("Error creating RDS Event Subscription %s: %s", name, err)
}

d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: d.SetId should handle pointers fine (unlike d.Set, IIRC)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bflad bflad merged commit 1d41a8e into master Apr 11, 2018
@bflad bflad deleted the b-aws_db_event_subscription-tags branch April 11, 2018 17:09
bflad added a commit that referenced this pull request Apr 11, 2018
bflad added a commit that referenced this pull request Apr 11, 2018
@bflad
Copy link
Contributor Author

bflad commented Apr 11, 2018

This has been released in version 1.14.1 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 6, 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 6, 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. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/rds Issues and PRs that pertain to the rds service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with tags in aws_db_event_subscription
2 participants