From 8d31650c2ba1442b8f5df8f7243008203c75db08 Mon Sep 17 00:00:00 2001 From: arunma Date: Tue, 5 Mar 2024 16:06:05 +0800 Subject: [PATCH] feat: add changelog --- .changelog/2549.txt | 3 +++ tencentcloud/services/cdb/resource_tc_mysql_instance.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/2549.txt diff --git a/.changelog/2549.txt b/.changelog/2549.txt new file mode 100644 index 0000000000..6c8c89bab3 --- /dev/null +++ b/.changelog/2549.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_mysql_instance: Fixed the problem of clienttoken duplication caused by creation retry. +``` \ No newline at end of file diff --git a/tencentcloud/services/cdb/resource_tc_mysql_instance.go b/tencentcloud/services/cdb/resource_tc_mysql_instance.go index 435ffc65f5..886e269cb8 100644 --- a/tencentcloud/services/cdb/resource_tc_mysql_instance.go +++ b/tencentcloud/services/cdb/resource_tc_mysql_instance.go @@ -573,7 +573,7 @@ func mysqlCreateInstancePayByMonth(ctx context.Context, d *schema.ResourceData, clientToken := helper.BuildToken() request.ClientToken = &clientToken r, inErr := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseMysqlClient().CreateDBInstance(request) - if inErr == nil { + if inErr != nil { log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), inErr.Error()) //internal version: replace bpass begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.