Closed luckeyca closed 1 year ago
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
Now we added a fix to validate the autonomous database if it is on standby and tried to register it with data safe. Please note that, terraform plan will not do validations such as state, provider APIs, etc. After apply, we validate the ADB role and return the error messages.
Fix will be available by jun 15th.
@luckeyca Please let us know if any assistance from the Oracle side on this issue, or else request to close this issue.
Community Note
Terraform Version and Provider Version
Terraform v1.4.5 on linux_amd64
provider registry.terraform.io/oracle/oci v4.117.0
Affected Resource(s)
oci_data_safe_target_database
Terraform Configuration Files
Expected Behavior
oci_data_safe_target_database should check and handle if the database is in standby mode before creating new registration or destroying the existing registration
Actual Behavior
terraform plan always works even if the target database is actually in standby mode which means there is NO proper validation code in place. As a result, if a previously registered database fails over to remote standby, and run "terraform destroy" to destroy the existing registration, the destroy will work. Then after the database fails back to be primary, it still shows as registered in data safe. In this case, when re-running terraform apply to register, even though terraform plan works, terraform apply will failed with only timeout error which again shows there is no error handling whatsoever which is very bad coding.
Steps to Reproduce
terraform apply
to register autonomous database primaryImportant Factoids
References