This is a simple module for creating EC2 instance with SSH Access.
- This module will create required security groups for SSH
- This module is designed to take advantage of local keys (
id_rsa
&id_rsa.pub
) - If you're using
id_rsa.pub
on your local machine then you can connect remote machine with simple commands.- Example:
ssh ec2-user@56.45.9.121
.
- Example:
These types of resources are supported:
Terraform 0.12. Pin module version to ~> v2.0
.
module "ec2_cluster" {
source = "github.com/rlnchow/terraform-ec2-instance-ssh"
name = "my-cluster"
instance_count = 5
region = "us-east-1"
ami = "ami-ebd02392"
vpc_id = "vpc-123456
key_name = "user1"
public_key = "/User/Ravipati/.ssh/id_rsa.pub" # Physical location of Key.
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
region | Region where to spin up EC2 instance | string | n/a | yes |
ami_id | ID of AMI to use for the instance | string | n/a | yes |
vpc_id | VPC ID | string | n/a | yes |
public_key | Location of Public ID on workstation | string | n/a | yes |
Name | Description |
---|---|
ec2_ip | Public IP address for instance |
ec2_id | Instance ID |
This module is created by using verified modules from Hashicorp