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
Copy file name to clipboardExpand all lines: website/docs/r/db_instance.html.markdown
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,11 @@ Provides a Database instance resource.
15
15
## Example Usage
16
16
17
17
```hcl
18
-
# Query availability zone
19
-
data "ucloud_zones" "default" {
20
-
}
21
18
22
19
# Create database instance
23
20
resource "ucloud_db_instance" "master" {
24
21
name = "tf-example-db"
22
+
availability_zone = "cn-bj2-05"
25
23
instance_storage = 20
26
24
instance_type = "mysql-ha-1"
27
25
engine = "mysql"
@@ -59,7 +57,9 @@ The following arguments are supported:
59
57
*`duration` - (Optional, ForceNew) The duration that you will buy the db instance (Default: `1`). The value is `0` when pay by month and the instance will be valid till the last day of that month. It is not required when `dynamic` (pay by hour).
60
58
*`vpc_id` - (Optional, ForceNew) The ID of VPC linked to the database instances.
61
59
*`subnet_id` - (Optional, ForceNew) The ID of subnet.
62
-
*`from_backup_id` - (Optional, ForceNew) Create the database instance with the content of specified backup.
60
+
*`from_backup_id` - (Optional, ForceNew) Create the database instance with the
61
+
content of specified backup. The backup id can be retrieved from UDB console
62
+
or by using the [`ucloud_db_backups`](https://registry.terraform.io/providers/ucloud/ucloud/latest/docs/data-sources/db_backups) datasource.
63
63
*`backup_count` - (Optional, ForceNew) Specifies the number of backup saved per week, it is 7 backups saved per week by default.
64
64
*`backup_begin_time` - (Optional) Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
65
65
*`backup_date` - (Optional) Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
0 commit comments