Skip to content

Commit c0164d6

Browse files
committed
doc(cdb): [117594777]modify dr instance doc
1 parent 6663b59 commit c0164d6

File tree

3 files changed

+51
-129
lines changed

3 files changed

+51
-129
lines changed
Lines changed: 25 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,38 @@
11
Provides a mysql instance resource to create read-only database instances.
22

3-
~> **NOTE:** Read-only instances can be purchased only for two-node or three-node source instances on MySQL 5.6 or above with the InnoDB engine at a specification of 1 GB memory and 50 GB disk capacity or above.
4-
~> **NOTE:** The terminate operation of read only mysql does NOT take effect immediately, maybe takes for several hours. so during that time, VPCs associated with that mysql instance can't be terminated also.
5-
63
Example Usage
74

85
```hcl
9-
data "tencentcloud_availability_zones_by_product" "zones" {
10-
product = "cdb"
11-
}
12-
13-
resource "tencentcloud_vpc" "vpc" {
14-
name = "vpc-mysql"
15-
cidr_block = "10.0.0.0/16"
16-
}
17-
18-
resource "tencentcloud_subnet" "subnet" {
19-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.0.name
20-
name = "subnet-mysql"
21-
vpc_id = tencentcloud_vpc.vpc.id
22-
cidr_block = "10.0.0.0/16"
23-
is_multicast = false
24-
}
25-
26-
resource "tencentcloud_security_group" "security_group" {
27-
name = "sg-mysql"
28-
description = "mysql test"
29-
}
30-
31-
resource "tencentcloud_mysql_instance" "example" {
32-
internet_service = 1
33-
engine_version = "5.7"
34-
charge_type = "POSTPAID"
35-
root_password = "PassWord123"
36-
slave_deploy_mode = 0
37-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.0.name
38-
slave_sync_mode = 1
39-
instance_name = "tf-example-mysql"
40-
mem_size = 4000
41-
volume_size = 200
42-
vpc_id = tencentcloud_vpc.vpc.id
43-
subnet_id = tencentcloud_subnet.subnet.id
44-
intranet_port = 3306
45-
security_groups = [tencentcloud_security_group.security_group.id]
46-
47-
tags = {
48-
name = "test"
49-
}
50-
51-
parameters = {
52-
character_set_server = "UTF8"
53-
max_connections = "1000"
54-
}
55-
}
56-
57-
resource "tencentcloud_mysql_readonly_instance" "example" {
58-
master_instance_id = tencentcloud_mysql_instance.example.id
59-
instance_name = "tf-example"
60-
mem_size = 128000
61-
volume_size = 255
62-
vpc_id = tencentcloud_vpc.vpc.id
63-
subnet_id = tencentcloud_subnet.subnet.id
64-
intranet_port = 3306
65-
security_groups = [tencentcloud_security_group.security_group.id]
66-
6+
resource "tencentcloud_mysql_dr_instance" "mysql_dr" {
7+
master_instance_id = "cdb-adjdu3t5"
8+
master_region = "ap-guangzhou"
9+
auto_renew_flag = 0
10+
availability_zone = "ap-shanghai-3"
11+
charge_type = "POSTPAID"
12+
cpu = 4
13+
device_type = "UNIVERSAL"
14+
first_slave_zone = "ap-shanghai-4"
15+
instance_name = "mysql-dr-test-up"
16+
mem_size = 8000
17+
prepaid_period = 1
18+
project_id = 0
19+
security_groups = [
20+
"sg-q4d821qk",
21+
]
22+
slave_deploy_mode = 1
23+
slave_sync_mode = 0
24+
subnet_id = "subnet-5vfntba5"
25+
volume_size = 100
26+
vpc_id = "vpc-h6s1s3aa"
27+
intranet_port = 3360
6728
tags = {
68-
createBy = "terraform"
29+
test = "test-tf"
6930
}
7031
}
7132
```
7233
Import
7334

74-
mysql read-only database instances can be imported using the id, e.g.
35+
mysql dr database instances can be imported using the id, e.g.
7536
```
76-
terraform import tencentcloud_mysql_readonly_instance.default cdb-dnqksd9f
37+
terraform import tencentcloud_mysql_dr_instance.mysql_dr cdb-bcet7sdb
7738
```

website/docs/d/gaap_real_servers_status.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Use this data source to query detailed information of gaap real servers status
1515

1616
```hcl
1717
data "tencentcloud_gaap_real_servers_status" "real_servers_status" {
18-
real_server_ids = ["rs-qcygnwpd"]
18+
real_server_ids = ["rs-3mlpbuut"]
1919
}
2020
```
2121

website/docs/r/mysql_dr_instance.html.markdown

Lines changed: 25 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,72 +11,33 @@ description: |-
1111

1212
Provides a mysql instance resource to create read-only database instances.
1313

14-
~> **NOTE:** Read-only instances can be purchased only for two-node or three-node source instances on MySQL 5.6 or above with the InnoDB engine at a specification of 1 GB memory and 50 GB disk capacity or above.
15-
~> **NOTE:** The terminate operation of read only mysql does NOT take effect immediately, maybe takes for several hours. so during that time, VPCs associated with that mysql instance can't be terminated also.
16-
1714
## Example Usage
1815

1916
```hcl
20-
data "tencentcloud_availability_zones_by_product" "zones" {
21-
product = "cdb"
22-
}
23-
24-
resource "tencentcloud_vpc" "vpc" {
25-
name = "vpc-mysql"
26-
cidr_block = "10.0.0.0/16"
27-
}
28-
29-
resource "tencentcloud_subnet" "subnet" {
30-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.0.name
31-
name = "subnet-mysql"
32-
vpc_id = tencentcloud_vpc.vpc.id
33-
cidr_block = "10.0.0.0/16"
34-
is_multicast = false
35-
}
36-
37-
resource "tencentcloud_security_group" "security_group" {
38-
name = "sg-mysql"
39-
description = "mysql test"
40-
}
41-
42-
resource "tencentcloud_mysql_instance" "example" {
43-
internet_service = 1
44-
engine_version = "5.7"
45-
charge_type = "POSTPAID"
46-
root_password = "PassWord123"
47-
slave_deploy_mode = 0
48-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.0.name
49-
slave_sync_mode = 1
50-
instance_name = "tf-example-mysql"
51-
mem_size = 4000
52-
volume_size = 200
53-
vpc_id = tencentcloud_vpc.vpc.id
54-
subnet_id = tencentcloud_subnet.subnet.id
55-
intranet_port = 3306
56-
security_groups = [tencentcloud_security_group.security_group.id]
57-
58-
tags = {
59-
name = "test"
60-
}
61-
62-
parameters = {
63-
character_set_server = "UTF8"
64-
max_connections = "1000"
65-
}
66-
}
67-
68-
resource "tencentcloud_mysql_readonly_instance" "example" {
69-
master_instance_id = tencentcloud_mysql_instance.example.id
70-
instance_name = "tf-example"
71-
mem_size = 128000
72-
volume_size = 255
73-
vpc_id = tencentcloud_vpc.vpc.id
74-
subnet_id = tencentcloud_subnet.subnet.id
75-
intranet_port = 3306
76-
security_groups = [tencentcloud_security_group.security_group.id]
77-
17+
resource "tencentcloud_mysql_dr_instance" "mysql_dr" {
18+
master_instance_id = "cdb-adjdu3t5"
19+
master_region = "ap-guangzhou"
20+
auto_renew_flag = 0
21+
availability_zone = "ap-shanghai-3"
22+
charge_type = "POSTPAID"
23+
cpu = 4
24+
device_type = "UNIVERSAL"
25+
first_slave_zone = "ap-shanghai-4"
26+
instance_name = "mysql-dr-test-up"
27+
mem_size = 8000
28+
prepaid_period = 1
29+
project_id = 0
30+
security_groups = [
31+
"sg-q4d821qk",
32+
]
33+
slave_deploy_mode = 1
34+
slave_sync_mode = 0
35+
subnet_id = "subnet-5vfntba5"
36+
volume_size = 100
37+
vpc_id = "vpc-h6s1s3aa"
38+
intranet_port = 3360
7839
tags = {
79-
createBy = "terraform"
40+
test = "test-tf"
8041
}
8142
}
8243
```
@@ -120,8 +81,8 @@ In addition to all arguments above, the following attributes are exported:
12081

12182
## Import
12283

123-
mysql read-only database instances can be imported using the id, e.g.
84+
mysql dr database instances can be imported using the id, e.g.
12485
```
125-
terraform import tencentcloud_mysql_readonly_instance.default cdb-dnqksd9f
86+
terraform import tencentcloud_mysql_dr_instance.mysql_dr cdb-bcet7sdb
12687
```
12788

0 commit comments

Comments
 (0)