Skip to content

Commit 59b2a0c

Browse files
authored
fix(vpn): [125115907] tencentcloud_vpn_connection optmize nil id value (#3417)
* add * add
1 parent 74f0c15 commit 59b2a0c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.changelog/3417.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_vpn_connection: optmize nil id value
3+
```

tencentcloud/services/vpn/resource_tc_vpn_connection.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,8 @@ func resourceTencentCloudVpnConnectionCreate(d *schema.ResourceData, meta interf
647647
log.Printf("[CRITAL]%s create VPN connection failed, reason:%s\n", logId, err.Error())
648648
return err
649649
}
650-
}
651-
652-
if vpnConnectionId == "" {
653-
return fmt.Errorf("VPN connection id is nil.")
650+
} else {
651+
vpnConnectionId = *response.Response.VpnConnection.VpnConnectionId
654652
}
655653

656654
d.SetId(vpnConnectionId)

0 commit comments

Comments
 (0)