Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tencentcloud/resource_tc_clb_listener_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ func resourceTencentCloudClbListenerRuleUpdate(d *schema.ResourceData, meta inte
domainChanged := false
domainRequest := clb.NewModifyDomainAttributesRequest()
if d.HasChange("domain") {
new, old := d.GetChange("domain")
old, new := d.GetChange("domain")
domainChanged = true
domainRequest.Domain = helper.String(old.(string))
domainRequest.NewDomain = helper.String(new.(string))
Expand Down
2 changes: 1 addition & 1 deletion tencentcloud/resource_tc_clb_listener_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestAccTencentCloudClbListenerRule_full(t *testing.T) {
testAccCheckClbListenerRuleExists("tencentcloud_clb_listener_rule.rule_full"),
resource.TestCheckResourceAttrSet("tencentcloud_clb_listener_rule.rule_full", "clb_id"),
resource.TestCheckResourceAttrSet("tencentcloud_clb_listener_rule.rule_full", "listener_id"),
resource.TestCheckResourceAttr("tencentcloud_clb_listener_rule.rule_full", "domain", "abcdr.com"),
resource.TestCheckResourceAttr("tencentcloud_clb_listener_rule.rule_full", "domain", "abcd.com"),
resource.TestCheckResourceAttr("tencentcloud_clb_listener_rule.rule_full", "session_expire_time", "60"),
resource.TestCheckResourceAttr("tencentcloud_clb_listener_rule.rule_full", "url", "/"),
resource.TestCheckResourceAttr("tencentcloud_clb_listener_rule.rule_full", "scheduler", "WRR"),
Expand Down
6 changes: 1 addition & 5 deletions tencentcloud/resource_tc_clb_target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,9 @@ func resourceTencentCloudClbTargetUpdate(d *schema.ResourceData, meta interface{
)

isChanged := false
if d.HasChange("port") {
if d.HasChange("port") || d.HasChange("target_group_name"){
isChanged = true
port = uint64(d.Get("port").(int))
}

if d.HasChange("target_group_name") {
isChanged = true
tgtGroupName = d.Get("target_group_name").(string)
}

Expand Down
2 changes: 1 addition & 1 deletion tencentcloud/resource_tc_clb_target_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestAccTencentCloudClbInstanceTargetGroup(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckClbTargetGroupExists("tencentcloud_clb_target_group.target_group"),
resource.TestCheckResourceAttr("tencentcloud_clb_target_group.target_group", "target_group_name", "tgt_grp_test"),
resource.TestCheckResourceAttr("tencentcloud_clb_target_group.target_group", "port", "33"),
resource.TestCheckResourceAttr("tencentcloud_clb_target_group.target_group", "port", "44"),
//resource.TestCheckResourceAttr("tencentcloud_clb_target_group.target_group", "target_group_instances.bind_ip", "10.0.0.4"),
//resource.TestCheckResourceAttr("tencentcloud_clb_target_group.target_group", "target_group_instances.port", "44"),
),
Expand Down