terraform-aws-fck-nat
terraform-aws-fck-nat copied to clipboard
Adding SSH Connection Capability to NAT Instance
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
module "fck-nat" {
# ...
ssh_enabled = true
ssh_public_key = file("keys/aws_ec2.pub")
ssh_public_key_name = "ssh-tunnel-key"
}