- Ensure you are signed up for AWS.
- Download the AWS command line interface.
- Set up the credentials file from AWS via
aws configure
git clone git@github.com:ryanmcdermott/terraform-ec2-instance.git
- Change the SSH key path variables in
variables.tf
to point to your SSH keys. terraform init
terraform apply
- Visit the AWS console and find the Instances page.
- Click the
my_instance
link. - Copy the Public IPv4 DNS name for the instance. It should look something like
ubuntu@ec2-[ip1-ip2-ip3-ip4].[REGION].compute.amazonaws.com
- Open a terminal on your computer.
ssh YOUR_HOSTNAME
terraform destroy