Skip to content

Commit

Permalink
Merge pull request #1612 from hashicorp/b-aws-fix-sg-self-rule
Browse files Browse the repository at this point in the history
provider/aws: Fix issue in Security Groups with empty IPRanges
  • Loading branch information
catsby committed Apr 21, 2015
2 parents 45f73e6 + 0c5011b commit f44964f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions builtin/providers/aws/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))})
}
}

Expand Down

0 comments on commit f44964f

Please sign in to comment.