Skip to content

Commit e7caab2

Browse files
committed
add
1 parent fc8ef63 commit e7caab2

4 files changed

+14
-20
lines changed

tencentcloud/services/cls/resource_tc_cls_cloud_product_log_task.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func ResourceTencentCloudClsCloudProductLogTask() *schema.Resource {
5858
"logset_name": {
5959
Type: schema.TypeString,
6060
Optional: true,
61+
ForceNew: true,
6162
Description: "Log set name, it will be automatically created.",
6263
},
6364

@@ -70,6 +71,7 @@ func ResourceTencentCloudClsCloudProductLogTask() *schema.Resource {
7071
"topic_name": {
7172
Type: schema.TypeString,
7273
Optional: true,
74+
ForceNew: true,
7375
Description: "The name of the log topic, it will be automatically created.",
7476
},
7577

@@ -233,7 +235,7 @@ func resourceTencentCloudClsCloudProductLogTaskUpdate(d *schema.ResourceData, me
233235

234236
ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
235237

236-
immutableArgs := []string{"instance_id", "assumer_name", "log_type", "cloud_product_region", "cls_region", "logset_name", "topic_name"}
238+
immutableArgs := []string{"instance_id", "assumer_name", "log_type", "cloud_product_region", "cls_region"}
237239
for _, v := range immutableArgs {
238240
if d.HasChange(v) {
239241
return fmt.Errorf("argument `%s` cannot be changed", v)

tencentcloud/services/postgresql/resource_tc_postgresql_parameter_template.go

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package postgresql
22

33
import (
44
"context"
5-
"fmt"
65
"log"
76

87
tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
@@ -24,32 +23,34 @@ func ResourceTencentCloudPostgresqlParameterTemplate() *schema.Resource {
2423
},
2524
Schema: map[string]*schema.Schema{
2625
"template_name": {
27-
Required: true,
2826
Type: schema.TypeString,
27+
Required: true,
2928
Description: "Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).",
3029
},
3130

3231
"db_major_version": {
33-
Required: true,
3432
Type: schema.TypeString,
33+
Required: true,
34+
ForceNew: true,
3535
Description: "The major database version number, such as 11, 12, 13.",
3636
},
3737

3838
"db_engine": {
39-
Required: true,
4039
Type: schema.TypeString,
40+
Required: true,
41+
ForceNew: true,
4142
Description: "Database engine, such as postgresql, mssql_compatible.",
4243
},
4344

4445
"template_description": {
45-
Optional: true,
4646
Type: schema.TypeString,
47+
Optional: true,
4748
Description: "Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).",
4849
},
4950

5051
"modify_param_entry_set": {
51-
Optional: true,
5252
Type: schema.TypeSet,
53+
Optional: true,
5354
Description: "The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.",
5455
Elem: &schema.Resource{
5556
Schema: map[string]*schema.Schema{
@@ -218,15 +219,6 @@ func resourceTencentCloudPostgresqlParameterTemplateUpdate(d *schema.ResourceDat
218219

219220
request.TemplateId = helper.String(d.Id())
220221

221-
immutableArgs := []string{"db_major_version", "db_engine"}
222-
223-
// do not care the param_info_set attribute
224-
for _, v := range immutableArgs {
225-
if d.HasChange(v) {
226-
return fmt.Errorf("argument `%s` cannot be changed", v)
227-
}
228-
}
229-
230222
if d.HasChange("template_name") {
231223
if v, ok := d.GetOk("template_name"); ok {
232224
request.TemplateName = helper.String(v.(string))

website/docs/r/cls_cloud_product_log_task.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ The following arguments are supported:
4949
* `instance_id` - (Required, String) Instance ID.
5050
* `log_type` - (Required, String) Log type, Values: CDS-AUDIT, CDS-RISK, CDB-AUDIT, TDSQL-C-AUDIT, MongoDB-AUDIT, MongoDB-SlowLog, MongoDB-ErrorLog, TDMYSQL-SLOW, DCDB-AUDIT, DCDB-SLOW, DCDB-ERROR, MariaDB-AUDIT, MariaDB-SLOW, MariaDB-ERROR, PostgreSQL-SLOW, PostgreSQL-ERROR, PostgreSQL-AUDIT, BH-FILELOG, BH-COMMANDLOG, APIS-ACCESS.
5151
* `extend` - (Optional, String) Log configuration extension information, generally used to store additional log delivery configurations.
52-
* `logset_name` - (Optional, String) Log set name, it will be automatically created.
53-
* `topic_name` - (Optional, String) The name of the log topic, it will be automatically created.
52+
* `logset_name` - (Optional, String, ForceNew) Log set name, it will be automatically created.
53+
* `topic_name` - (Optional, String, ForceNew) The name of the log topic, it will be automatically created.
5454

5555
## Attributes Reference
5656

website/docs/r/postgresql_parameter_template.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ resource "tencentcloud_postgresql_parameter_template" "parameter_template" {
3737

3838
The following arguments are supported:
3939

40-
* `db_engine` - (Required, String) Database engine, such as postgresql, mssql_compatible.
41-
* `db_major_version` - (Required, String) The major database version number, such as 11, 12, 13.
40+
* `db_engine` - (Required, String, ForceNew) Database engine, such as postgresql, mssql_compatible.
41+
* `db_major_version` - (Required, String, ForceNew) The major database version number, such as 11, 12, 13.
4242
* `template_name` - (Required, String) Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
4343
* `delete_param_set` - (Optional, Set: [`String`]) The set of parameters that need to be deleted.
4444
* `modify_param_entry_set` - (Optional, Set) The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.

0 commit comments

Comments
 (0)