Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access bastion host via elb #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robinbowes
Copy link

This change adds a classic ELB in front of the instance, which makes it possible to assign a Route53 alias record.

@antonbabenko
Copy link
Member

I see a bit too many problems with such implementation (and using ELB for doing SSH), but to be short I wonder what will happen when there are several servers behind ELB? Do you propose to use sticky-sessions (hmm)?

And in the first place, what was the problem you wanted to solve with this code?

@robinbowes
Copy link
Author

ELB classic works fine for ssh using a TCP connection. There will only ever be one bastion host so multiple servers is not a problem.

The problem I wanted to solve was to be able to create a Route53 Alias record for our bastion hosts., rather than managing an EIP association. With my approach, there is nothing to manage as AWS makes sure the Alias record always points to the DNS name of the ELB.

@antonbabenko
Copy link
Member

I honestly see very little benefits of supporting ELB in favor of using Alias records with Route53. There are 3 main issues:

  • Pricing of ELB vs pricing of EIP. ELB costs $18/month, EIP is likely to be zero. Multiple that by a number of bastion hosts (people sometimes run one per AWS account or one per environment).
  • Overall architecture is getting more complex than it can be.
  • Keep-alive settings on ELB should be very high to keep connection open. How high?

If you could rework the code to make creation of ELB conditional (using variable like ${var.use_eip}) and describe in a README file how to make it to work with ELB and EIP that would be nice and we can definitelly merge it. Make creation of EIP by default to prevent BC for the users.

@robinbowes
Copy link
Author

Actually, I think a better approach would be to manage the ELB outside the module and pass it in to optionally attach it to the ASG.

I'll look into refactoring and try that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants