Terraform-provider-aws: issue dropping a rds event subscription

Created on 16 Jul 2019  ·  7Comments  ·  Source: hashicorp/terraform-provider-aws

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
bug servicrds upstream

Most helpful comment

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",
................

All 7 comments

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",
................

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

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.

Fix submitted: #9371

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. 👍

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!

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!

Was this page helpful?
0 / 5 - 0 ratings