Skip to content

Commit 5486b08

Browse files
authored
fix(postgresql): [120427548] tencentcloud_postgresql_clone_db_instance support dedicated_cluster_id params (#2920)
* add * add
1 parent 6290725 commit 5486b08

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

.changelog/2920.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_postgresql_clone_db_instance: add `dedicated_cluster_id` params
3+
```

tencentcloud/services/postgresql/resource_tc_postgresql_clone_db_instance.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tencentcloud/services/postgresql/resource_tc_postgresql_clone_db_instance.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,38 @@ resource "tencentcloud_postgresql_clone_db_instance" "example" {
7777
}
7878
}
7979
```
80+
81+
Clone db instance from CDC
82+
83+
```hcl
84+
resource "tencentcloud_postgresql_clone_db_instance" "example" {
85+
db_instance_id = "postgres-evsqpyap"
86+
name = "tf-example-clone"
87+
spec_code = "pg.it.medium4"
88+
storage = 200
89+
period = 1
90+
auto_renew_flag = 0
91+
vpc_id = "vpc-a6zec4mf"
92+
subnet_id = "subnet-b8hintyy"
93+
instance_charge_type = "POSTPAID_BY_HOUR"
94+
security_group_ids = ["sg-8stavs03"]
95+
project_id = 0
96+
recovery_target_time = "2024-10-12 18:17:00"
97+
db_node_set {
98+
role = "Primary"
99+
zone = "ap-guangzhou-6"
100+
dedicated_cluster_id = "cluster-262n63e8"
101+
}
102+
103+
db_node_set {
104+
role = "Standby"
105+
zone = "ap-guangzhou-6"
106+
dedicated_cluster_id = "cluster-262n63e8"
107+
}
108+
109+
tag_list {
110+
tag_key = "createBy"
111+
tag_value = "terraform"
112+
}
113+
}
114+
```

website/docs/r/postgresql_clone_db_instance.html.markdown

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,41 @@ resource "tencentcloud_postgresql_clone_db_instance" "example" {
8787
}
8888
```
8989

90+
### Clone db instance from CDC
91+
92+
```hcl
93+
resource "tencentcloud_postgresql_clone_db_instance" "example" {
94+
db_instance_id = "postgres-evsqpyap"
95+
name = "tf-example-clone"
96+
spec_code = "pg.it.medium4"
97+
storage = 200
98+
period = 1
99+
auto_renew_flag = 0
100+
vpc_id = "vpc-a6zec4mf"
101+
subnet_id = "subnet-b8hintyy"
102+
instance_charge_type = "POSTPAID_BY_HOUR"
103+
security_group_ids = ["sg-8stavs03"]
104+
project_id = 0
105+
recovery_target_time = "2024-10-12 18:17:00"
106+
db_node_set {
107+
role = "Primary"
108+
zone = "ap-guangzhou-6"
109+
dedicated_cluster_id = "cluster-262n63e8"
110+
}
111+
112+
db_node_set {
113+
role = "Standby"
114+
zone = "ap-guangzhou-6"
115+
dedicated_cluster_id = "cluster-262n63e8"
116+
}
117+
118+
tag_list {
119+
tag_key = "createBy"
120+
tag_value = "terraform"
121+
}
122+
}
123+
```
124+
90125
## Argument Reference
91126

92127
The following arguments are supported:
@@ -132,6 +167,7 @@ The `db_node_set` object supports the following:
132167
`Primary`;
133168
`Standby`.
134169
* `zone` - (Required, String) AZ where the node resides, such as ap-guangzhou-1.
170+
* `dedicated_cluster_id` - (Optional, String) Dedicated cluster ID.
135171

136172
The `tag_list` object supports the following:
137173

0 commit comments

Comments
 (0)