provider/aws: Fix issue in Classic env with external Security Groups

Linking a security group from another account requires setting the UserID, which
we were stripping out
This commit is contained in:
Clint Shryock 2015-07-07 12:06:36 -06:00
parent b4c1c223ff
commit cc79e6cb8d
1 changed files with 5 additions and 2 deletions

View File

@ -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
}
}
}