Skip to content

Commit d78da3c

Browse files
Cloud sql documentation changes (#15953)
1 parent a29c901 commit d78da3c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,46 @@ resource "google_sql_database_instance" "main" {
270270
}
271271
```
272272

273+
### Cloud SQL Instance created with backupdr_backup
274+
~> **NOTE:** For restoring from a backupdr_backup, note that the backup must be in active state. List down the backups using `google_backup_dr_backup`. Replace `backupdr_backup_full_path` with the backup name.
275+
276+
```hcl
277+
resource "google_sql_database_instance" "instance" {
278+
name = "main-instance"
279+
database_version = "MYSQL_8_0"
280+
settings {
281+
tier = "db-f1-micro"
282+
backup_configuration {
283+
enabled = true
284+
binary_log_enabled = true
285+
}
286+
backupdr_backup = "backupdr_backup_full_path"
287+
}
288+
}
289+
```
290+
291+
### Cloud SQL Instance created using point_in_time_restore
292+
~> **NOTE:** Replace `backupdr_datasource` with the full datasource path, `time_stamp` should be in the format of `YYYY-MM-DDTHH:MM:SSZ`.
293+
294+
```hcl
295+
resource "google_sql_database_instance" "instance" {
296+
name = "main-instance"
297+
database_version = "MYSQL_8_0"
298+
settings {
299+
tier = "db-f1-micro"
300+
backup_configuration {
301+
enabled = true
302+
binary_log_enabled = true
303+
}
304+
}
305+
point_in_time_restore_context {
306+
datasource = "backupdr_datasource"
307+
target_instance = "target_instance_name"
308+
point_in_time = "time_stamp"
309+
}
310+
}
311+
```
312+
273313
## Argument Reference
274314

275315
The following arguments are supported:

0 commit comments

Comments
 (0)