Skip to content

Commit feab631

Browse files
author
ivan
committed
添加安全组对内网clb的支持(注释掉对当前网络是否为内网的判断)
1 parent d761221 commit feab631

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tencentcloud/resource_tc_clb_instance.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,7 @@ func resourceTencentCloudClbInstanceCreate(d *schema.ResourceData, meta interfac
197197
if (targetRegionInfoRegion != "" && targetRegionInfoVpcId == "") || (targetRegionInfoRegion == "" && targetRegionInfoVpcId != "") {
198198
return fmt.Errorf("[CHECK][CLB instance][Create] check: region and vpc_id must be set at same time")
199199
}
200-
if _, ok := d.GetOk("security_groups"); ok {
201-
if networkType == CLB_NETWORK_TYPE_INTERNAL {
202-
return fmt.Errorf("[CHECK][CLB instance][Create] check: INTERNAL network_type do not support this operation with sercurity_groups")
203-
}
204-
}
200+
205201
request := clb.NewCreateLoadBalancerRequest()
206202
request.LoadBalancerType = helper.String(networkType)
207203
request.LoadBalancerName = helper.String(clbName)
@@ -515,9 +511,7 @@ func resourceTencentCloudClbInstanceUpdate(d *schema.ResourceData, meta interfac
515511
}
516512

517513
if d.HasChange("security_groups") {
518-
if d.Get("network_type") == CLB_NETWORK_TYPE_INTERNAL {
519-
return fmt.Errorf("[CHECK][CLB instance %s][Update] check: INTERNAL network_type do not support this operation with sercurity_groups", clbId)
520-
}
514+
521515
sgRequest := clb.NewSetLoadBalancerSecurityGroupsRequest()
522516
sgRequest.LoadBalancerId = helper.String(clbId)
523517
securityGroups := d.Get("security_groups").([]interface{})

0 commit comments

Comments
 (0)