From 879aeedd0869c01645a5d940de5d0157601e2b16 Mon Sep 17 00:00:00 2001 From: arunma Date: Tue, 19 Sep 2023 22:59:43 +0800 Subject: [PATCH] fix: rename --- tencentcloud/provider.go | 4 +-- ...> resource_tc_ses_black_list_operation.go} | 26 +++++++++---------- ...ource_tc_ses_black_list_operation_test.go} | 4 +-- 3 files changed, 16 insertions(+), 18 deletions(-) rename tencentcloud/{resource_tc_ses_black_list.go => resource_tc_ses_black_list_operation.go} (67%) rename tencentcloud/{resource_tc_ses_black_list_test.go => resource_tc_ses_black_list_operation_test.go} (91%) diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 4248c5e591..f74036f2d5 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1211,7 +1211,7 @@ Simple Email Service(SES) tencentcloud_ses_send_email tencentcloud_ses_batch_send_email tencentcloud_ses_verify_domain - tencentcloud_ses_black_list + tencentcloud_ses_black_list_operation Security Token Service(STS) Data Source @@ -2816,7 +2816,7 @@ func Provider() *schema.Provider { "tencentcloud_ses_send_email": resourceTencentCloudSesSendEmail(), "tencentcloud_ses_batch_send_email": resourceTencentCloudSesBatchSendEmail(), "tencentcloud_ses_verify_domain": resourceTencentCloudSesVerifyDomain(), - "tencentcloud_ses_black_list": resourceTencentCloudSesBlackList(), + "tencentcloud_ses_black_list_operation": resourceTencentCloudSesBlackListOperation(), "tencentcloud_sms_sign": resourceTencentCloudSmsSign(), "tencentcloud_sms_template": resourceTencentCloudSmsTemplate(), "tencentcloud_dcdb_account": resourceTencentCloudDcdbAccount(), diff --git a/tencentcloud/resource_tc_ses_black_list.go b/tencentcloud/resource_tc_ses_black_list_operation.go similarity index 67% rename from tencentcloud/resource_tc_ses_black_list.go rename to tencentcloud/resource_tc_ses_black_list_operation.go index 6a579eaa7b..81d78634b0 100644 --- a/tencentcloud/resource_tc_ses_black_list.go +++ b/tencentcloud/resource_tc_ses_black_list_operation.go @@ -22,14 +22,12 @@ import ( "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" ) -func resourceTencentCloudSesBlackList() *schema.Resource { +func resourceTencentCloudSesBlackListOperation() *schema.Resource { return &schema.Resource{ - Create: resourceTencentCloudSesBlackListCreate, - Read: resourceTencentCloudSesBlackListRead, - Delete: resourceTencentCloudSesBlackListDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, + Create: resourceTencentCloudSesBlackListOperationCreate, + Read: resourceTencentCloudSesBlackListOperationRead, + Delete: resourceTencentCloudSesBlackListOperationDelete, + Schema: map[string]*schema.Schema{ "email_address": { Required: true, @@ -41,8 +39,8 @@ func resourceTencentCloudSesBlackList() *schema.Resource { } } -func resourceTencentCloudSesBlackListCreate(d *schema.ResourceData, meta interface{}) error { - defer logElapsed("resource.tencentcloud_ses_black_list.create")() +func resourceTencentCloudSesBlackListOperationCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_ses_black_list_operation.create")() defer inconsistentCheck(d, meta)() logId := getLogId(contextNil) @@ -72,18 +70,18 @@ func resourceTencentCloudSesBlackListCreate(d *schema.ResourceData, meta interfa d.SetId(emailAddress) - return resourceTencentCloudSesBlackListRead(d, meta) + return resourceTencentCloudSesBlackListOperationRead(d, meta) } -func resourceTencentCloudSesBlackListRead(d *schema.ResourceData, meta interface{}) error { - defer logElapsed("resource.tencentcloud_ses_black_list.read")() +func resourceTencentCloudSesBlackListOperationRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_ses_black_list_operation.read")() defer inconsistentCheck(d, meta)() return nil } -func resourceTencentCloudSesBlackListDelete(d *schema.ResourceData, meta interface{}) error { - defer logElapsed("resource.tencentcloud_ses_black_list.delete")() +func resourceTencentCloudSesBlackListOperationDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_ses_black_list_operation.delete")() defer inconsistentCheck(d, meta)() return nil diff --git a/tencentcloud/resource_tc_ses_black_list_test.go b/tencentcloud/resource_tc_ses_black_list_operation_test.go similarity index 91% rename from tencentcloud/resource_tc_ses_black_list_test.go rename to tencentcloud/resource_tc_ses_black_list_operation_test.go index 05e2150cac..ebaf3b0e63 100644 --- a/tencentcloud/resource_tc_ses_black_list_test.go +++ b/tencentcloud/resource_tc_ses_black_list_operation_test.go @@ -18,7 +18,7 @@ func TestAccTencentNeedFixCloudSesBlackListResource_basic(t *testing.T) { { Config: testAccSesBlackList, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("tencentcloud_ses_black_list.black_list", "id"), + resource.TestCheckResourceAttrSet("tencentcloud_ses_black_list_operation.black_list", "id"), ), }, }, @@ -42,7 +42,7 @@ resource "tencentcloud_ses_send_email" "send_email" { trigger_type = 1 } -resource "tencentcloud_ses_black_list" "black_list" { +resource "tencentcloud_ses_black_list_operation" "black_list" { email_address = "terraform-tf@gmail.com" depends_on = [ tencentcloud_ses_send_email.send_email ] }