provider/aws: Fix issue with empty IPRanges
This commit is contained in:
parent
45f73e640f
commit
0c5011bea4
|
@ -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))})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue