Open luckeyca opened 8 months ago
also open SR: 3-35781677651
the bottom line is in the terraform resource, database binary install and database instance provision should be separated, either in the same resource like the pseudo code above, or like other CSPs, such azure/gcp/aws, using multiple resources because database binary install is tied to one VM/location, but database is not. As long as the code is changed like this. the terraform code will be idempotent as it should be.
Community Note
Description
Currently to deploy a cross region data guard, it's required to create one resource for primary and 2nd for cross region standby, given the code for primary and standby are not the same, once database fails over, the code becomes invalid and cannot be re-run. Given terraform is declarative programming language, this should NOT happen. The current deployment coding have multiple issues. see the example for the the current deployment
New or Affected Resource(s)
oci_database_autonomous_database
Potential Terraform Configuration
With the pseudo code below, it will address all the issues mentioned above.
References