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:
parent
b4c1c223ff
commit
cc79e6cb8d
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue