Skip to content

Commit 1f5c00f

Browse files
authored
support tdsql-c (#2399)
* support tdsql-c * support tdsql-c
1 parent 01b2bf7 commit 1f5c00f

File tree

4 files changed

+88
-2
lines changed

4 files changed

+88
-2
lines changed

.changelog/2399.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_ssm_product_secret: Support create ssm secret for tdsql-c-mysql.
3+
```

tencentcloud/resource_tc_ssm_product_secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func resourceTencentCloudSsmProductSecret() *schema.Resource {
3333
"product_name": {
3434
Required: true,
3535
Type: schema.TypeString,
36-
Description: "Name of the Tencent Cloud service bound to the credential, such as `Mysql`, `Tdsql-mysql`. you can use dataSource `tencentcloud_ssm_products` to query supported products.",
36+
Description: "Name of the Tencent Cloud service bound to the credential, such as `Mysql`, `Tdsql-mysql`, `Tdsql_C_Mysql`. you can use dataSource `tencentcloud_ssm_products` to query supported products.",
3737
},
3838
"instance_id": {
3939
Required: true,

tencentcloud/services/ssm/resource_tc_ssm_product_secret.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Provides a resource to create a ssm product_secret
22

33
Example Usage
44

5+
Ssm secret for mysql
6+
57
```hcl
68
data "tencentcloud_availability_zones_by_product" "zones" {
79
product = "cdb"
@@ -83,4 +85,43 @@ resource "tencentcloud_ssm_product_secret" "example" {
8385
"createdBy" = "terraform"
8486
}
8587
}
88+
```
89+
90+
Ssm secret for tdsql-c-mysql
91+
```hcl
92+
resource "tencentcloud_ssm_product_secret" "example" {
93+
secret_name = "tf-tdsql-c-example"
94+
user_name_prefix = "prefix"
95+
product_name = "Tdsql_C_Mysql"
96+
instance_id = "cynosdbmysql-xxxxxx"
97+
domains = ["%"]
98+
privileges_list {
99+
privilege_name = "GlobalPrivileges"
100+
privileges = [
101+
"ALTER",
102+
"CREATE",
103+
"DELETE",
104+
]
105+
}
106+
privileges_list {
107+
privilege_name = "DatabasePrivileges"
108+
database = "test"
109+
privileges = [
110+
"ALTER",
111+
"CREATE",
112+
"DELETE",
113+
"SELECT",
114+
]
115+
}
116+
description = "test tdsql-c"
117+
kms_key_id = null
118+
status = "Enabled"
119+
enable_rotation = false
120+
rotation_begin_time = "2023-08-05 20:54:33"
121+
rotation_frequency = 30
122+
123+
tags = {
124+
"createdBy" = "terraform"
125+
}
126+
}
86127
```

website/docs/r/ssm_product_secret.html.markdown

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Provides a resource to create a ssm product_secret
1313

1414
## Example Usage
1515

16+
### Ssm secret for mysql
17+
1618
```hcl
1719
data "tencentcloud_availability_zones_by_product" "zones" {
1820
product = "cdb"
@@ -96,14 +98,54 @@ resource "tencentcloud_ssm_product_secret" "example" {
9698
}
9799
```
98100

101+
### Ssm secret for tdsql-c-mysql
102+
103+
```hcl
104+
resource "tencentcloud_ssm_product_secret" "example" {
105+
secret_name = "tf-tdsql-c-example"
106+
user_name_prefix = "prefix"
107+
product_name = "Tdsql_C_Mysql"
108+
instance_id = "cynosdbmysql-xxxxxx"
109+
domains = ["%"]
110+
privileges_list {
111+
privilege_name = "GlobalPrivileges"
112+
privileges = [
113+
"ALTER",
114+
"CREATE",
115+
"DELETE",
116+
]
117+
}
118+
privileges_list {
119+
privilege_name = "DatabasePrivileges"
120+
database = "test"
121+
privileges = [
122+
"ALTER",
123+
"CREATE",
124+
"DELETE",
125+
"SELECT",
126+
]
127+
}
128+
description = "test tdsql-c"
129+
kms_key_id = null
130+
status = "Enabled"
131+
enable_rotation = false
132+
rotation_begin_time = "2023-08-05 20:54:33"
133+
rotation_frequency = 30
134+
135+
tags = {
136+
"createdBy" = "terraform"
137+
}
138+
}
139+
```
140+
99141
## Argument Reference
100142

101143
The following arguments are supported:
102144

103145
* `domains` - (Required, Set: [`String`]) Domain name of the account in the form of IP. You can enter `%`.
104146
* `instance_id` - (Required, String) Tencent Cloud service instance ID.
105147
* `privileges_list` - (Required, List) List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
106-
* `product_name` - (Required, String) Name of the Tencent Cloud service bound to the credential, such as `Mysql`, `Tdsql-mysql`. you can use dataSource `tencentcloud_ssm_products` to query supported products.
148+
* `product_name` - (Required, String) Name of the Tencent Cloud service bound to the credential, such as `Mysql`, `Tdsql-mysql`, `Tdsql_C_Mysql`. you can use dataSource `tencentcloud_ssm_products` to query supported products.
107149
* `secret_name` - (Required, String, ForceNew) Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
108150
* `user_name_prefix` - (Required, String) Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
109151
* `description` - (Optional, String) Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.

0 commit comments

Comments
 (0)