Skip to content

Commit

Permalink
Fixed binary log doc (#5963) (#4245)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 21, 2022
1 parent 74b2ad5 commit fc91610
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .changelog/5963.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:none
```
13 changes: 6 additions & 7 deletions google-beta/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ func resourceSqlDatabaseInstance() *schema.Resource {
Default: "ZONAL",
ValidateFunc: validation.StringInSlice([]string{"REGIONAL", "ZONAL"}, false),
Description: `The availability type of the Cloud SQL instance, high availability
(REGIONAL) or single zone (ZONAL). For MySQL and SQL Server instances, ensure that
settings.backup_configuration.enabled and
settings.backup_configuration.binary_log_enabled are both set to true.
For Postgres instances, ensure that settings.backup_configuration.enabled
and settings.backup_configuration.point_in_time_recovery_enabled
are both set to true.`,
(REGIONAL) or single zone (ZONAL). For all instances, ensure that
settings.backup_configuration.enabled is set to true.
For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true.
For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled
is set to true.`,
},
"backup_configuration": {
Type: schema.TypeList,
Expand All @@ -178,7 +177,7 @@ are both set to true.`,
Type: schema.TypeBool,
Optional: true,
AtLeastOneOf: backupConfigurationKeys,
Description: `True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Cannot be used with Postgres.`,
Description: `True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL.`,
},
"enabled": {
Type: schema.TypeBool,
Expand Down
11 changes: 6 additions & 5 deletions website/docs/r/sql_database_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ The `settings` block supports:
active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.

* `availability_type` - (Optional, Default: `ZONAL`) The availability type of the Cloud SQL
instance, high availability (`REGIONAL`) or single zone (`ZONAL`).' For MySQL and SQL Server instances,
ensure that `settings.backup_configuration.enabled` and `settings.backup_configuration.binary_log_enabled`
are both set to `true`. For Postgres instances, ensure that `settings.backup_configuration.enabled`
and `settings.backup_configuration.point_in_time_recovery_enabled` are both set to `true`.
instance, high availability (`REGIONAL`) or single zone (`ZONAL`).' For all instances, ensure that
`settings.backup_configuration.enabled` is set to `true`.
For MySQL instances, ensure that `settings.backup_configuration.binary_log_enabled` is set to `true`.
For Postgres instances, ensure that `settings.backup_configuration.point_in_time_recovery_enabled`
is set to `true`.

* `collation` - (Optional) The name of server instance collation.

Expand All @@ -256,7 +257,7 @@ The optional `settings.database_flags` sublist supports:
The optional `settings.backup_configuration` subblock supports:

* `binary_log_enabled` - (Optional) True if binary logging is enabled.
Cannot be used with Postgres.
Can only be used with MySQL.

* `enabled` - (Optional) True if backup configuration is enabled.

Expand Down

0 comments on commit fc91610

Please sign in to comment.