You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mark the psa_write_endpoint field as Computed and relax the constraint so that the replication cluster is set if there is a DR replica set or there is a PSA write endpoint (#15921)
Copy file name to clipboardExpand all lines: mmv1/third_party/terraform/services/sql/resource_sql_database_instance.go.tmpl
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1224,6 +1224,7 @@ API (for read pools, effective_availability_type may differ from availability_ty
1224
1224
"psa_write_endpoint": {
1225
1225
Type: schema.TypeString,
1226
1226
Optional: true,
1227
+
Computed: true,
1227
1228
Description: fmt.Sprintf(`If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.`),
1228
1229
},
1229
1230
"failover_dr_replica_name": {
@@ -1239,7 +1240,7 @@ API (for read pools, effective_availability_type may differ from availability_ty
1239
1240
},
1240
1241
},
1241
1242
},
1242
-
Description: "A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.",
1243
+
Description: "A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set if the primary has psa_write_endpoint set or both the primary and replica are created.",
1243
1244
},
1244
1245
"server_ca_cert": {
1245
1246
Type: schema.TypeList,
@@ -2596,9 +2597,21 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{})
Copy file name to clipboardExpand all lines: mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -690,7 +690,7 @@ block during resource creation/update will trigger the restore action after the
690
690
691
691
*`project` - (Optional) The full project ID of the source instance.`
692
692
693
-
The optional, computed `replication_cluster` block represents a primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created. This block supports:
693
+
The optional, computed `replication_cluster` block represents a primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set if the primary has psa_write_endpoint set or both the primary and replica are created. This block supports:
694
694
695
695
*`psa_write_endpoint`: Read-only field which if set, indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
0 commit comments