A group of opinionated terraform examples for AWS that create a VPC and supporting resources.
vpc.tf creates a VPC, NAT subnet, NAT EC2 instance
app1.tf creates the network resources needed to run an application. This will spin up a x number of subnets for separate ELB, application, and data tiers. This number is determined by the number of subnets defined in the variables.tf file.
Rename variables.tf.example to variables.tf in order to configure the region and other variables.
- Run
terraform apply
and specify the requested arguments - SSH into the IP of the deployed
vpn
server with your keypair under the usernameopenvpnas
. - Follow the instructions. Of note, OpenVPN should listen on
0.0.0.0
. - Change the password of the
openvpn
user viasudo su
andpasswd
- Connect your local machine to the VPN as
openvpn