Skip to content

Commit

Permalink
fix: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmkn committed Sep 19, 2023
1 parent bc53e8b commit 879aeed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
),
},
},
Expand All @@ -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 = "[email protected]"
depends_on = [ tencentcloud_ses_send_email.send_email ]
}
Expand Down

0 comments on commit 879aeed

Please sign in to comment.