diff --git a/.changelog/3533.txt b/.changelog/3533.txt new file mode 100644 index 0000000000..2ca6eeb8dd --- /dev/null +++ b/.changelog/3533.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_cfw_edge_firewall_switch: fix read failed +``` diff --git a/tencentcloud/services/cfw/resource_tc_cfw_edge_firewall_switch_test.go b/tencentcloud/services/cfw/resource_tc_cfw_edge_firewall_switch_test.go index 5e22ba034d..591cc91866 100644 --- a/tencentcloud/services/cfw/resource_tc_cfw_edge_firewall_switch_test.go +++ b/tencentcloud/services/cfw/resource_tc_cfw_edge_firewall_switch_test.go @@ -41,16 +41,16 @@ func TestAccTencentCloudNeedFixCfwEdgeFirewallSwitchResource_basic(t *testing.T) const testAccCfwEdgeFirewallSwitch = ` resource "tencentcloud_cfw_edge_firewall_switch" "example" { - public_ip = "43.138.44.22" - switch_mode = 1 - enable = 0 + public_ip = "106.53.77.106" + switch_mode = 0 + enable = 1 } ` const testAccCfwEdgeFirewallSwitchUpdate = ` resource "tencentcloud_cfw_edge_firewall_switch" "example" { - public_ip = "43.138.44.22" + public_ip = "106.53.77.106" switch_mode = 0 - enable = 1 + enable = 0 } ` diff --git a/tencentcloud/services/cfw/service_tencentcloud_cfw.go b/tencentcloud/services/cfw/service_tencentcloud_cfw.go index 9034586092..46224591d8 100644 --- a/tencentcloud/services/cfw/service_tencentcloud_cfw.go +++ b/tencentcloud/services/cfw/service_tencentcloud_cfw.go @@ -826,6 +826,7 @@ func (me *CfwService) DescribeCfwEdgeFirewallSwitchById(ctx context.Context, pub OperatorType: common.Int64Ptr(1), }, } + request.Limit = helper.Int64(10) defer func() { if errRet != nil {