Skip to content

Commit

Permalink
provider/aws: Fix issue in Classic env with external Security Groups
Browse files Browse the repository at this point in the history
Linking a security group from another account requires setting the UserID, which
we were stripping out
  • Loading branch information
catsby committed Jul 7, 2015
1 parent b4c1c22 commit cc79e6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions builtin/providers/aws/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ func expandIPPerms(

perm.UserIDGroupPairs[i] = &ec2.UserIDGroupPair{
GroupID: aws.String(id),
UserID: aws.String(ownerId),
}

if ownerId != "" {
perm.UserIDGroupPairs[i].UserID = aws.String(ownerId)
}

if !vpc {
perm.UserIDGroupPairs[i].GroupID = nil
perm.UserIDGroupPairs[i].GroupName = aws.String(id)
perm.UserIDGroupPairs[i].UserID = nil
}
}
}
Expand Down

0 comments on commit cc79e6c

Please sign in to comment.