aws: use IpPermissions for authorizing temporary security group
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
This commit is contained in:
parent
b316be51cd
commit
00c96fc400
|
@ -92,11 +92,19 @@ func (s *StepSecurityGroup) Run(_ context.Context, state multistep.StateBag) mul
|
||||||
|
|
||||||
// Authorize the SSH access for the security group
|
// Authorize the SSH access for the security group
|
||||||
groupRules := &ec2.AuthorizeSecurityGroupIngressInput{
|
groupRules := &ec2.AuthorizeSecurityGroupIngressInput{
|
||||||
GroupId: groupResp.GroupId,
|
GroupId: groupResp.GroupId,
|
||||||
IpProtocol: aws.String("tcp"),
|
IpPermissions: []*ec2.IpPermission{
|
||||||
FromPort: aws.Int64(int64(port)),
|
{
|
||||||
ToPort: aws.Int64(int64(port)),
|
FromPort: aws.Int64(int64(port)),
|
||||||
CidrIp: aws.String(s.TemporarySGSourceCidr),
|
ToPort: aws.Int64(int64(port)),
|
||||||
|
IpRanges: []*ec2.IpRange{
|
||||||
|
{
|
||||||
|
CidrIp: aws.String(s.TemporarySGSourceCidr),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
IpProtocol: aws.String("tcp"),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.Say(fmt.Sprintf(
|
ui.Say(fmt.Sprintf(
|
||||||
|
|
Loading…
Reference in New Issue