Open luckeyca opened 1 year ago
@luckeyca Added the reaction, and also commenting to say, facing same issue here, any solution you got for this ?
Hi @kk-hiraskar, I think for now the workaround is to set the deploy to false ONE-by-ONE to make sure standby is gone first, before set primary to deploy = false. This is very sad as adb development hasn't been really active on many of the reported terraform bugs.
@kk-hiraskar. It's been a while. for now, you can also time_sleep to add a delay destroy https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep. The permanent solution is to re-work the resource to make it more like terraform declarative. I have an enhancement request here: https://github.com/oracle/terraform-provider-oci/issues/2046 which oracle has an ER that is being active looked at and worked on from what I heard.
Community Note
Terraform Version and Provider Version
Terraform v1.4.5 on linux_amd64
Affected Resource(s)
oci_database_autonomous_database
Terraform Configuration Files
Expected Behavior
When destroying the standby and primary database by switching the *_deploy from true to false, standby should be destroyed followed by primary.
Actual Behavior
standby was destroyed first correctly, then primary destroy process started and failed right away with error saying standby needs to be destroyed first. However, from both terraform results and from oci gui console, it indeed showed standby was already destroyed. error with opc request ID as below:
Steps to Reproduce
Important Factoids
References