-
Notifications
You must be signed in to change notification settings - Fork 38
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
Adding SSH Connection Capability to NAT Instance #14
Conversation
When you have the time, it would be great if this could be merged into main @RaJiska |
Been busy moving lately and had PRs accumulating ye. As I'm starting to get more time I will look into this either this weekend or next week. |
Thank you for taking the time to review my pull request and for your valuable suggestions. I've pushed the requested changes. I decided to streamline the variables by removing ssh_enabled and adjusting the behavior of ssh_key_name. With this update, the presence of a value in ssh_key_name now determines whether SSH is enabled or disabled. If ssh_key_name is set to null, SSH is automatically disabled. Conversely, if a value is provided, SSH is enabled. Here is an update usage example: module "fck-nat" {
#...
ssh_key_name = aws_key_pair.ssh_key.key_name
ssh_cidr_blocks = ["0.0.0.0/0"]
} Let me know if there are any further adjustments or if you require additional information :) |
Thanks for updating the PR. I'd have a couple more requests:
I tested the changes and it worked on my end. Once the couple points above sorted, I think it will be ready to be merged. Thank you for your continued work on this 💯 |
Overview
This PR introduces the capability to establish SSH connections to the NAT instance. This feature enables users to utilize the existing EC2 instance as an SSH tunnel, offering a cost-effective solution for accessing services on the private VPC, such as RDS instances, without the need to provision additional EC2 instances.
Motivation
The primary motivation behind this enhancement is to leverage the AWS Free Tier benefits effectively. With the AWS Free Tier providing one EC2 instance, users can now utilize the NAT instance for both its intended purpose and as an SSH tunnel, maximizing the usage of the available resources without incurring additional costs.
Usage Example