Skip to content

Commit 23742c0

Browse files
authored
Merge pull request #486 from tencentyun/master
fixed mulit vpn spd
2 parents 066ff6d + 4863aaa commit 23742c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tencentcloud/resource_tc_vpn_connection.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ func resourceTencentCloudVpnConnectionCreate(d *schema.ResourceData, meta interf
290290
if len(sgps) < 1 {
291291
return fmt.Errorf("Para `security_group_policy` should be set at least one.")
292292
}
293+
294+
request.SecurityPolicyDatabases = make([]*vpc.SecurityPolicyDatabase, 0, len(sgps))
293295
for _, v := range sgps {
294296
m := v.(map[string]interface{})
295-
request.SecurityPolicyDatabases = make([]*vpc.SecurityPolicyDatabase, 0, len(sgps))
296297
var sgp vpc.SecurityPolicyDatabase
297298
local := m["local_cidr_block"].(string)
298299
sgp.LocalCidrBlock = &local

0 commit comments

Comments
 (0)