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

Unable to destroy the RDS and the parameter_option_group during the same pipeline #78

Closed
idelkysq opened this issue Sep 17, 2018 · 7 comments

Comments

@idelkysq
Copy link

Hello @antonbabenko,

While trying to destroy my RDS instance with terraform-destroy (using this template with modules), I'm getting errors as the db_parameter-group can't be deleted, it happens during the first time that I run terraform-destroy: "InvalidDBParameterGroupState: one or more database instances are still members of this parameter group". In this case, I checked and the rds instance is deleted and the db_option_group too.

When I tried for a second time, it's deleted without errors. I think there are dependencies issues and because the instance takes a long to be deleted, terraform doesn't realised that the rds is deleted when trying to delete the db_parameter group.

It could be possible to implement a wait condition between modules?

Thanks

@antonbabenko
Copy link
Member

Hi @idelkysq !

There is no easy way to specify conditions between modules in Terraform 0.11 and rerun it the second time is sometimes the easiest solution (yes, it may be not optimal for some situations, I know).

@idelkysq
Copy link
Author

Hi @antonbabenko
Thanks very much for your reply! I'll keep running twice then! ;)

@asantos82
Copy link

@idelkysq

Even going to AWS Console, and trying to delete the Option Group, when nothing is associated fails. You'll have to wait some time before being able to delete it

@bobchaos
Copy link
Contributor

bobchaos commented Mar 18, 2019

this is an AWS issue, RDS keeps a super-secret snapshot that you can't see or act upon, and those get cleaned up every 30mins (or 1 hour?, can't recall). Until the cleanup happens, the db_param group won't despawn (why those 2 things are tied together I don't know).

The only option available on TF side is to make it wait for some crazy amount of time like 1 hour before he declares failure, but that may not be desirable behavior either

@bryantbiggs
Copy link
Member

hi all - closing this issue as its outside the scope of the module

@b-dean
Copy link

b-dean commented Jan 25, 2022

here's the related issue in the aws provider: hashicorp/terraform-provider-aws#6448

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants