Merge pull request #1612 from hashicorp/b-aws-fix-sg-self-rule

provider/aws: Fix issue in Security Groups with empty IPRanges
This commit is contained in:
Clint 2015-04-21 11:14:03 -05:00
commit f44964f8bd
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))})
}
}