NGINX AutoScalingGroup with ELB on Custom VPC and private subnet on RDS

aws-diagram

Prerequisites

On ~/.aws/credentials create a new profile

[terraform_user_profile]
aws_access_key_id=YOUR_ACCESS_KEY_ID
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY
terraform@11
ssh-keygen

Installing

brew install terraform@0.11

Deployment

chmod +x deploy.sh.sh
./deploy.sh.sh

How to apply changes

cd environments/dev_nginx_elb/
terraform plan
terraform apply

How to SSH into instances

ssh -i "~/ssh_custom_keys/key_access_asg_nginx_example.pem" -A ec2-user@x.x.x.x
ssh ubuntu@y.y.y.y

Result

Result

Destroy

cd environments/dev_nginx_elb/
terraform destroy

Built With

Authors