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

issue dropping a rds event subscription #9368

Closed
dkowalcz opened this issue Jul 16, 2019 · 7 comments · Fixed by #9371
Closed

issue dropping a rds event subscription #9368

dkowalcz opened this issue Jul 16, 2019 · 7 comments · Fixed by #9371
Assignees
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service. upstream Addresses functionality related to the cloud provider.
Milestone

Comments

@dkowalcz
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Affected Resource(s)

  • aws_XXXXX

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 16, 2019
@dkowalcz
Copy link
Author

Related to issue #9243 - I still have the issue even though I used provider 2.19:

I just ran into the same issue using version2.19.0 - the destroy removed the event from AWS but left the entry in the statefile:

  • provider.aws: version = "~> 2.19"

Terraform has been successfully initialized!

aws_db_event_subscription.EventSubscriptionAlarmInstance: Refreshing state... (ID: isg-mysql-demo4-eventsubscriptionalarminstance)

Error: Error refreshing state: 1 error(s) occurred:

  • aws_db_event_subscription.EventSubscriptionAlarmInstance: 1 error(s) occurred:

  • aws_db_event_subscription.EventSubscriptionAlarmInstance: aws_db_event_subscription.EventSubscriptionAlarmInstance: error retrieving RDS Event Subscription (isg-mysql-demo4-eventsubscriptionalarminstance): SubscriptionNotFound: Event Subscription isg-mysql-demo4-eventsubscriptionalarminstance not found.
    status code: 404, request id: b8ec0a3f-e84e-4eef-9e6b-adf15bb88d69

Statefile:
"primary": {
"id": "isg-mysql-demo4-eventsubscriptionalarminstance",
"attributes": {
"arn": "arn:aws:rds:us-east-1:############:es:isg-mysql-demo4-eventsubscriptionalarminstance",
"customer_aws_id": "############",
"enabled": "true",
"event_categories.#": "12",
"event_categories.1068999359": "availability",
"event_categories.1072746924": "backup",
"event_categories.1866582008": "restoration",
"event_categories.2890955135": "configuration change",
"event_categories.3037192942": "low storage",
"event_categories.3102116255": "failover",
"event_categories.3209983690": "notification",
"event_categories.3430174804": "read replica",
"event_categories.4081292233": "recovery",
"event_categories.563807169": "failure",
"event_categories.769513765": "deletion",
"event_categories.797243625": "maintenance",
"id": "isg-mysql-demo4-eventsubscriptionalarminstance",
"name": "isg-mysql-demo4-eventsubscriptionalarminstance",
................

@spacefuntus
Copy link

Team , please fix this asap as it is impacting a lot.

@bflad bflad added bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service. upstream Addresses functionality related to the cloud provider. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 16, 2019
@bflad bflad added this to the v2.20.0 milestone Jul 16, 2019
@bflad bflad self-assigned this Jul 16, 2019
@bflad
Copy link
Contributor

bflad commented Jul 16, 2019

This appears to be another RDS API update that is being deployed out into certain regions. For example, this is reproducible in our acceptance testing in us-gov-west-1 and us-east-1, but not us-west-2.

us-west-2:

--- PASS: TestAccAWSDBEventSubscription_basicUpdate (120.96s)

us-east-1:

--- FAIL: TestAccAWSDBEventSubscription_basicUpdate (1228.44s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: error waiting for RDS Event Subscription (tf-acc-test-rds-event-subs-2201031712637090321) deletion: SubscriptionNotFound: Event Subscription tf-acc-test-rds-event-subs-2201031712637090321 not found.

Given this is already reproducible in the acceptance testing, I should be able to submit a fix shortly that will get included in this week's Terraform AWS Provider release.

bflad added a commit that referenced this issue Jul 16, 2019
…s during Read and Deletion

Reference: #9368

Previously (in us-gov-west-1 and us-east-1):

```
--- FAIL: TestAccAWSDBEventSubscription_basicUpdate (1228.44s)
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: error waiting for RDS Event Subscription (tf-acc-test-rds-event-subs-2201031712637090321) deletion: SubscriptionNotFound: Event Subscription tf-acc-test-rds-event-subs-2201031712637090321 not found.
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSDBEventSubscription_withPrefix (535.76s)
--- PASS: TestAccAWSDBEventSubscription_importBasic (537.39s)
--- PASS: TestAccAWSDBEventSubscription_withSourceIds (539.77s)
--- PASS: TestAccAWSDBEventSubscription_disappears (543.52s)
--- PASS: TestAccAWSDBEventSubscription_categoryUpdate (944.42s)
--- PASS: TestAccAWSDBEventSubscription_basicUpdate (945.75s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSDBEventSubscription_withPrefix (622.68s)
--- PASS: TestAccAWSDBEventSubscription_importBasic (623.98s)
--- PASS: TestAccAWSDBEventSubscription_withSourceIds (628.56s)
--- PASS: TestAccAWSDBEventSubscription_disappears (631.20s)
--- PASS: TestAccAWSDBEventSubscription_basicUpdate (978.81s)
--- PASS: TestAccAWSDBEventSubscription_categoryUpdate (978.91s)
```
@bflad
Copy link
Contributor

bflad commented Jul 16, 2019

Fix submitted: #9371

@bflad
Copy link
Contributor

bflad commented Jul 18, 2019

The fix to have the resource appropriately handle the SubscriptionNotFound error on read and deletion has been merged and will release with version 2.20.0 of the Terraform AWS Provider, later today. 👍

@nywilken
Copy link
Contributor

The fix to the aws_db_event_subscription resource, has been released in version 2.20.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 resource, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
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/rds Issues and PRs that pertain to the rds service. upstream Addresses functionality related to the cloud provider.
Projects
None yet
4 participants