We are seeing fairly regular issues deleting aws_db_option_group
when removing the aws_db_instance
first in the same destroy path.
Looking at the debug logs, the issue is that while the DB instance is non-existent per the Request rds/DescribeDBInstances
returning 404 however upon initial rds/DeleteOptionGroup
request there is a 400 error thrown for InvalidOptionGroupStateFault
due to The option group 'dev-data-primary-justin-option-group' cannot be deleted because it is in use.
0.6.16+
* aws_db_option_group.xmldb: Error Deleting DB Option Group: InvalidOptionGroupStateFault: The option group 'dev-data-primary-option-group' cannot be deleted because it is in use.
status code: 400, request id: d732f0b9-37a5-11e6-a48d-af638ac63cab
DB Option group deletes properly seeing that AWS DB Instance had been deleted
AWS exception stating that DB Option Group is still in use and fails deletion (intermittently but primarily with Oracle RDS instances)
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform destroy
I have been unable to replicate this yet with smaller MySQL instances however can consistently reproduce with the Oracle 11-ee instance we have based off a larger snapshot.
I know that this was fixed by increasing the timeout limit. I am wondering if as a best practice it would be beneficial to allow an acceptable timeout switch. Not just for this but for all items.
I (still) get this issue consistently with SQL Server. Eventually after a few days you can delete the option set.
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.
Most helpful comment
I (still) get this issue consistently with SQL Server. Eventually after a few days you can delete the option set.