Skip to content

Commit bdd192b

Browse files
committed
add
1 parent c064697 commit bdd192b

File tree

2 files changed

+31
-42
lines changed

2 files changed

+31
-42
lines changed

tencentcloud/services/sqlserver/resource_tc_sqlserver_readonly_instance.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,18 @@ resource "tencentcloud_security_group" "security_group" {
2525
description = "desc."
2626
}
2727
28-
resource "tencentcloud_sqlserver_basic_instance" "example" {
29-
name = "tf-example"
30-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
31-
charge_type = "POSTPAID_BY_HOUR"
32-
vpc_id = tencentcloud_vpc.vpc.id
33-
subnet_id = tencentcloud_subnet.subnet.id
34-
project_id = 0
35-
memory = 4
36-
storage = 100
37-
cpu = 2
38-
machine_type = "CLOUD_PREMIUM"
39-
maintenance_week_set = [1, 2, 3]
40-
maintenance_start_time = "09:00"
41-
maintenance_time_span = 3
42-
security_groups = [tencentcloud_security_group.security_group.id]
43-
44-
tags = {
45-
"test" = "test"
46-
}
28+
resource "tencentcloud_sqlserver_instance" "example" {
29+
name = "tf-example"
30+
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
31+
multi_zones = true
32+
charge_type = "POSTPAID_BY_HOUR"
33+
engine_version = "2019"
34+
vpc_id = tencentcloud_vpc.vpc.id
35+
subnet_id = tencentcloud_subnet.subnet.id
36+
project_id = 0
37+
memory = 16
38+
storage = 20
39+
security_groups = [tencentcloud_security_group.security_group.id]
4740
}
4841
4942
resource "tencentcloud_sqlserver_readonly_instance" "example" {
@@ -54,11 +47,11 @@ resource "tencentcloud_sqlserver_readonly_instance" "example" {
5447
subnet_id = tencentcloud_subnet.subnet.id
5548
memory = 4
5649
storage = 20
57-
master_instance_id = tencentcloud_sqlserver_basic_instance.example.id
50+
master_instance_id = tencentcloud_sqlserver_instance.example.id
5851
readonly_group_type = 1
5952
force_upgrade = true
6053
tags = {
61-
"test" = "test"
54+
CreateBy = "Terraform"
6255
}
6356
}
6457
```

website/docs/r/sqlserver_readonly_instance.html.markdown

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,18 @@ resource "tencentcloud_security_group" "security_group" {
3636
description = "desc."
3737
}
3838
39-
resource "tencentcloud_sqlserver_basic_instance" "example" {
40-
name = "tf-example"
41-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
42-
charge_type = "POSTPAID_BY_HOUR"
43-
vpc_id = tencentcloud_vpc.vpc.id
44-
subnet_id = tencentcloud_subnet.subnet.id
45-
project_id = 0
46-
memory = 4
47-
storage = 100
48-
cpu = 2
49-
machine_type = "CLOUD_PREMIUM"
50-
maintenance_week_set = [1, 2, 3]
51-
maintenance_start_time = "09:00"
52-
maintenance_time_span = 3
53-
security_groups = [tencentcloud_security_group.security_group.id]
54-
55-
tags = {
56-
"test" = "test"
57-
}
39+
resource "tencentcloud_sqlserver_instance" "example" {
40+
name = "tf-example"
41+
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
42+
multi_zones = true
43+
charge_type = "POSTPAID_BY_HOUR"
44+
engine_version = "2019"
45+
vpc_id = tencentcloud_vpc.vpc.id
46+
subnet_id = tencentcloud_subnet.subnet.id
47+
project_id = 0
48+
memory = 16
49+
storage = 20
50+
security_groups = [tencentcloud_security_group.security_group.id]
5851
}
5952
6053
resource "tencentcloud_sqlserver_readonly_instance" "example" {
@@ -65,11 +58,11 @@ resource "tencentcloud_sqlserver_readonly_instance" "example" {
6558
subnet_id = tencentcloud_subnet.subnet.id
6659
memory = 4
6760
storage = 20
68-
master_instance_id = tencentcloud_sqlserver_basic_instance.example.id
61+
master_instance_id = tencentcloud_sqlserver_instance.example.id
6962
readonly_group_type = 1
7063
force_upgrade = true
7164
tags = {
72-
"test" = "test"
65+
CreateBy = "Terraform"
7366
}
7467
}
7568
```
@@ -106,6 +99,9 @@ In addition to all arguments above, the following attributes are exported:
10699

107100
* `id` - ID of the resource.
108101
* `create_time` - Create time of the SQL Server instance.
102+
* `engine_version` - Version of the SQL Server database engine.
103+
* `ha_type` - Instance type.
104+
* `project_id` - Project ID.
109105
* `ro_flag` - Readonly flag. `RO` (read-only instance), `MASTER` (primary instance with read-only instances). If it is left empty, it refers to an instance which is not read-only and has no RO group.
110106
* `status` - Status of the SQL Server instance. 1 for applying, 2 for running, 3 for running with limit, 4 for isolated, 5 for recycling, 6 for recycled, 7 for running with task, 8 for off-line, 9 for expanding, 10 for migrating, 11 for readonly, 12 for rebooting.
111107
* `vip` - IP for private access.

0 commit comments

Comments
 (0)