Skip to content

Commit

Permalink
Make sure control port is opened for EC2
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Aug 31, 2023
1 parent d1f5c7a commit 1f695e1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions provision/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,11 @@ func (p *EC2Provisioner) Provision(host BasicHost) (*ProvisionedHost, error) {
if err != nil {
return nil, err
}
controlPort := 8123

port, err := strconv.Atoi(host.Additional["inlets-port"])
if err != nil {
return nil, err
}

proV := host.Additional["pro"]
openHighPortsV := host.Additional["pro"]

proPorts, _ := strconv.ParseBool(proV)
openHighPorts, _ := strconv.ParseBool(openHighPortsV)

ports := host.Additional["ports"]

Expand All @@ -56,7 +52,7 @@ func (p *EC2Provisioner) Provision(host BasicHost) (*ProvisionedHost, error) {
var vpcID = host.Additional["vpc-id"]
var subnetID = host.Additional["subnet-id"]

groupID, name, err := p.createEC2SecurityGroup(vpcID, port, proPorts, extraPorts)
groupID, name, err := p.createEC2SecurityGroup(vpcID, controlPort, openHighPorts, extraPorts)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1f695e1

Please sign in to comment.