provider/aws: Fix issue with empty IPRanges

This commit is contained in:
Clint Shryock 2015-04-21 10:57:50 -05:00
parent 45f73e640f
commit 0c5011bea4
1 changed files with 2 additions and 3 deletions

View File

@ -93,9 +93,8 @@ func expandIPPerms(
if raw, ok := m["cidr_blocks"]; ok {
list := raw.([]interface{})
perm.IPRanges = make([]*ec2.IPRange, len(list))
for i, v := range list {
perm.IPRanges[i] = &ec2.IPRange{CIDRIP: aws.String(v.(string))}
for _, v := range list {
perm.IPRanges = append(perm.IPRanges, &ec2.IPRange{CIDRIP: aws.String(v.(string))})
}
}