diff --git a/.changelog/3663.txt b/.changelog/3663.txt new file mode 100644 index 0000000000..9efe9b0a03 --- /dev/null +++ b/.changelog/3663.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_cfw_nat_policy: optimiz code logic +``` \ No newline at end of file diff --git a/tencentcloud/services/cfw/resource_tc_cfw_nat_policy.go b/tencentcloud/services/cfw/resource_tc_cfw_nat_policy.go index 458fbf94cc..9d5473031f 100644 --- a/tencentcloud/services/cfw/resource_tc_cfw_nat_policy.go +++ b/tencentcloud/services/cfw/resource_tc_cfw_nat_policy.go @@ -173,7 +173,7 @@ func resourceTencentCloudCfwNatPolicyCreate(d *schema.ResourceData, meta interfa log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) } - if result == nil || result.Response == nil || response.Response.RuleUuid == nil || len(result.Response.RuleUuid) == 0 { + if result == nil || result.Response == nil || result.Response.RuleUuid == nil || len(result.Response.RuleUuid) == 0 { return resource.NonRetryableError(fmt.Errorf("Create cfw natPolicy failed, Response is nil.")) }