Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Mar 9, 2016
1 parent 23c42cd commit f96ec46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/aws/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*ec2.
if g.UserId != nil && *g.UserId != "" && (ownerId == nil || *ownerId != *g.UserId) {
userId = g.UserId
}
// userid nil here for same vpc groups

vpc := g.GroupName == nil || *g.GroupName == ""
var id *string
Expand All @@ -338,6 +339,9 @@ func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*ec2.
id = g.GroupName
}

// id is groupid for vpcs
// id is groupname for non vpc (classic)

if userId != nil {
id = aws.String(*userId + "/" + *id)
}
Expand Down

0 comments on commit f96ec46

Please sign in to comment.