Skip to content

Commit

Permalink
fix: vpc modify cidr
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiMengXS committed Nov 29, 2023
1 parent 80341fd commit 261295d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tencentcloud/resource_tc_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ func resourceTencentCloudVpcInstanceUpdate(d *schema.ResourceData, meta interfac
request := vpc.NewModifyAssistantCidrRequest()
request.VpcId = &id

nowTmp := now.([]interface{})
if len(nowTmp) > 0 {
request.NewCidrBlocks = helper.InterfacesStringsPoint(now.([]interface{}))
nowTmp, ok := now.([]interface{})
if ok && len(nowTmp) > 0 {
request.NewCidrBlocks = helper.InterfacesStringsPoint(nowTmp)
}

oldTmp := old.([]interface{})
if len(oldTmp) > 0 {
request.OldCidrBlocks = helper.InterfacesStringsPoint(old.([]interface{}))
oldTmp, ok := old.([]interface{})
if ok && len(oldTmp) > 0 {
request.OldCidrBlocks = helper.InterfacesStringsPoint(oldTmp)
}

if err := vpcService.ModifyAssistantCidr(ctx, request); err != nil {
Expand Down

0 comments on commit 261295d

Please sign in to comment.