Skip to content

Commit 4282990

Browse files
author
mikatong
committed
update resource name
1 parent e5520bb commit 4282990

8 files changed

+37
-37
lines changed

tencentcloud/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ func Provider() *schema.Provider {
15041504
"tencentcloud_postgresql_instance_ha_config": postgresql.ResourceTencentCloudPostgresqlInstanceHAConfig(),
15051505
"tencentcloud_postgresql_account": postgresql.ResourceTencentCloudPostgresqlAccount(),
15061506
"tencentcloud_postgresql_account_privileges_operation": postgresql.ResourceTencentCloudPostgresqlAccountPrivilegesOperation(),
1507-
"tencentcloud_postgresql_apply_template_operation": postgresql.ResourceTencentCloudPostgresqlApplyTemplateOperation(),
1507+
"tencentcloud_postgresql_apply_parameter_template_operation": postgresql.ResourceTencentCloudPostgresqlApplyParameterTemplateOperation(),
15081508
"tencentcloud_sqlserver_instance": sqlserver.ResourceTencentCloudSqlserverInstance(),
15091509
"tencentcloud_sqlserver_db": sqlserver.ResourceTencentCloudSqlserverDB(),
15101510
"tencentcloud_sqlserver_account": sqlserver.ResourceTencentCloudSqlserverAccount(),

tencentcloud/provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ TencentDB for PostgreSQL(PostgreSQL)
899899
tencentcloud_postgresql_base_backup
900900
tencentcloud_postgresql_instance_ha_config
901901
tencentcloud_postgresql_account
902-
tencentcloud_postgresql_apply_template_operation
902+
tencentcloud_postgresql_apply_parameter_template_operation
903903

904904
TencentDB for Redis(crs)
905905
Data Source

tencentcloud/services/postgresql/resource_tc_postgresql_apply_template_operation.go renamed to tencentcloud/services/postgresql/resource_tc_postgresql_apply_parameter_template_operation.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
postgres "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312"
1212
)
1313

14-
func ResourceTencentCloudPostgresqlApplyTemplateOperation() *schema.Resource {
14+
func ResourceTencentCloudPostgresqlApplyParameterTemplateOperation() *schema.Resource {
1515
return &schema.Resource{
16-
Create: resourceTencentCloudPostgresqlApplyTemplateOperationCreate,
17-
Read: resourceTencentCloudPostgresqlApplyTemplateOperationRead,
18-
Delete: resourceTencentCloudPostgresqlApplyTemplateOperationDelete,
16+
Create: resourceTencentCloudPostgresqlApplyParameterTemplateOperationCreate,
17+
Read: resourceTencentCloudPostgresqlApplyParameterTemplateOperationRead,
18+
Delete: resourceTencentCloudPostgresqlApplyParameterTemplateOperationDelete,
1919
Schema: map[string]*schema.Schema{
2020
"db_instance_id": {
2121
Required: true,
@@ -33,8 +33,8 @@ func ResourceTencentCloudPostgresqlApplyTemplateOperation() *schema.Resource {
3333
}
3434
}
3535

36-
func resourceTencentCloudPostgresqlApplyTemplateOperationCreate(d *schema.ResourceData, meta interface{}) error {
37-
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_template_operation.create")()
36+
func resourceTencentCloudPostgresqlApplyParameterTemplateOperationCreate(d *schema.ResourceData, meta interface{}) error {
37+
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_parameter_template_operation.create")()
3838
defer tccommon.InconsistentCheck(d, meta)()
3939

4040
logId := tccommon.GetLogId(tccommon.ContextNil)
@@ -102,18 +102,18 @@ func resourceTencentCloudPostgresqlApplyTemplateOperationCreate(d *schema.Resour
102102

103103
d.SetId(dbInstanceId + tccommon.FILED_SP + templateId)
104104

105-
return resourceTencentCloudPostgresqlApplyTemplateOperationRead(d, meta)
105+
return resourceTencentCloudPostgresqlApplyParameterTemplateOperationRead(d, meta)
106106
}
107107

108-
func resourceTencentCloudPostgresqlApplyTemplateOperationRead(d *schema.ResourceData, meta interface{}) error {
109-
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_template_operation.read")()
108+
func resourceTencentCloudPostgresqlApplyParameterTemplateOperationRead(d *schema.ResourceData, meta interface{}) error {
109+
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_parameter_template_operation.read")()
110110
defer tccommon.InconsistentCheck(d, meta)()
111111

112112
return nil
113113
}
114114

115-
func resourceTencentCloudPostgresqlApplyTemplateOperationDelete(d *schema.ResourceData, meta interface{}) error {
116-
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_template_operation.delete")()
115+
func resourceTencentCloudPostgresqlApplyParameterTemplateOperationDelete(d *schema.ResourceData, meta interface{}) error {
116+
defer tccommon.LogElapsed("resource.tencentcloud_postgresql_apply_parameter_template_operation.delete")()
117117
defer tccommon.InconsistentCheck(d, meta)()
118118

119119
return nil
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Provides a resource to apply parameter template
2+
3+
Example Usage
4+
5+
```hcl
6+
resource tencentcloud_postgresql_apply_parameter_template_operation "apply_parameter_template_operation" {
7+
db_instance_id = "postgres-xxxxxx"
8+
template_id = "xxxxxx"
9+
}
10+
```

tencentcloud/services/postgresql/resource_tc_postgresql_apply_template_operation_test.go renamed to tencentcloud/services/postgresql/resource_tc_postgresql_apply_parameter_template_operation_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ import (
88
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
99
)
1010

11-
func TestAccTencentCloudPostgresqlApplyTemplateOperationResource_basic(t *testing.T) {
11+
func TestAccTencentCloudPostgresqlApplyParameterTemplateOperationResource_basic(t *testing.T) {
1212
resource.Test(t, resource.TestCase{
1313
PreCheck: func() {
1414
tcacctest.AccPreCheck(t)
1515
},
1616
Providers: tcacctest.AccProviders,
1717
Steps: []resource.TestStep{
1818
{
19-
Config: testPostgresqlApplyTemplateOperation,
19+
Config: testPostgresqlApplyParameterTemplateOperation,
2020
Check: resource.ComposeTestCheckFunc(
21-
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_template_operation.apply_template_operation", "id"),
22-
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_template_operation.apply_template_operation", "db_instance_id"),
23-
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_template_operation.apply_template_operation", "template_id"),
21+
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_parameter_template_operation.apply_parameter_template_operation", "id"),
22+
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_parameter_template_operation.apply_parameter_template_operation", "db_instance_id"),
23+
resource.TestCheckResourceAttrSet("tencentcloud_postgresql_apply_parameter_template_operation.apply_parameter_template_operation", "template_id"),
2424
),
2525
},
2626
},
2727
})
2828
}
2929

30-
const testPostgresqlApplyTemplateOperation = testAccPostgresqlInstance + `
30+
const testPostgresqlApplyParameterTemplateOperation = testAccPostgresqlInstance + `
3131
resource "tencentcloud_postgresql_parameter_template" "parameter_template" {
3232
template_name = "tf_test_apply"
3333
db_major_version = "13"
@@ -40,7 +40,7 @@ resource "tencentcloud_postgresql_parameter_template" "parameter_template" {
4040
}
4141
}
4242
43-
resource tencentcloud_postgresql_apply_template_operation "apply_template_operation" {
43+
resource tencentcloud_postgresql_apply_parameter_template_operation "apply_parameter_template_operation" {
4444
db_instance_id = tencentcloud_postgresql_instance.test.id
4545
template_id = tencentcloud_postgresql_parameter_template.parameter_template.id
4646
}

tencentcloud/services/postgresql/resource_tc_postgresql_apply_template_operation.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

website/docs/r/postgresql_apply_template_operation.html.markdown renamed to website/docs/r/postgresql_apply_parameter_template_operation.html.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
subcategory: "TencentDB for PostgreSQL(PostgreSQL)"
33
layout: "tencentcloud"
4-
page_title: "TencentCloud: tencentcloud_postgresql_apply_template_operation"
5-
sidebar_current: "docs-tencentcloud-resource-postgresql_apply_template_operation"
4+
page_title: "TencentCloud: tencentcloud_postgresql_apply_parameter_template_operation"
5+
sidebar_current: "docs-tencentcloud-resource-postgresql_apply_parameter_template_operation"
66
description: |-
7-
Provides a resource to apply template
7+
Provides a resource to apply parameter template
88
---
99

10-
# tencentcloud_postgresql_apply_template_operation
10+
# tencentcloud_postgresql_apply_parameter_template_operation
1111

12-
Provides a resource to apply template
12+
Provides a resource to apply parameter template
1313

1414
## Example Usage
1515

1616
```hcl
17-
resource tencentcloud_postgresql_apply_template_operation "apply_template_operation" {
17+
resource tencentcloud_postgresql_apply_parameter_template_operation "apply_parameter_template_operation" {
1818
db_instance_id = "postgres-xxxxxx"
1919
template_id = "xxxxxx"
2020
}

website/tencentcloud.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5829,7 +5829,7 @@
58295829
<a href="/docs/providers/tencentcloud/r/postgresql_account.html">tencentcloud_postgresql_account</a>
58305830
</li>
58315831
<li>
5832-
<a href="/docs/providers/tencentcloud/r/postgresql_apply_template_operation.html">tencentcloud_postgresql_apply_template_operation</a>
5832+
<a href="/docs/providers/tencentcloud/r/postgresql_apply_parameter_template_operation.html">tencentcloud_postgresql_apply_parameter_template_operation</a>
58335833
</li>
58345834
<li>
58355835
<a href="/docs/providers/tencentcloud/r/postgresql_backup_download_restriction_config.html">tencentcloud_postgresql_backup_download_restriction_config</a>

0 commit comments

Comments
 (0)