inlets / inletsctl

Create inlets servers on the top cloud platforms
https://docs.inlets.dev/
MIT License
463 stars 61 forks source link

Create command results in 400 if default VPC is unavailable for ec2 provider #74

Closed thesurlydev closed 3 years ago

thesurlydev commented 4 years ago

A failure occurs when attempting to create an exit node via inletsctl create command for ec2 provider.

Expected Behaviour

An ec2 instance and security group are successfully created.

Current Behaviour

A 400 status is returned with the following message when a default VPC is unavailable:

InvalidParameter: The AssociatePublicIpAddress parameter is only supported for VPC launches.

Possible Solution

Explicitly require vpc-id and subnet-id when provider is ec2. This fixes the above issue and allows users to have full control of where the exit node will be placed. I will be following up with proposed fix via PR shortly.

Steps to Reproduce (for bugs)

Execute the following command for an AWS account/region with no default VPC:

./inletsctl create -f ~/Downloads/access-key --secret-key-file ~/Downloads/secret-access-key -p ec2 -r us-west-2

Context

Your Environment

Waterdrips commented 4 years ago

/assign: digitalsanctum

Waterdrips commented 3 years ago

/close this has been implemented here an in inlets operator. Many thanks @digitalsanctum