Merge pull request #2644 from hashicorp/b-aws-sg-account-update

provider/aws: Fix issue in Classic env with external Security Groups
This commit is contained in:
Clint 2015-07-08 12:29:50 -06:00
commit f2ff63d0da
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
}
}
}