Install Wordpress in the AWS Cloud using Terraform.
With assistance from http://architecture.ginocoates.com/2017/01/01/terraforming-wp-on-aws/
Q) You derp, wp and Terraform are easy, why did you do this?
A) 'cause I am not a uber-terraform-brain like you; learning takes time and practice.
Q) I did everything it said but when I use the DNS address nothing happens, why?!
A) Terraform will output success when AWS receives the request to provision the EC2 instance; however, the instance still takes time to start up.
Q) Can I use this?
A) Yes, in accordance to the attached MIT Lic.
Q) Why am I getting charged by AWS?
A) Most likely reason is that you might have forgot to run the terraform destroy
command to remove the resources that were created.
- An (AWS)[https://aws.amazon.com/] account
- (aws-cli)[https://docs.aws.amazon.com/cli/latest/userguide/installing.html]
- Terminal
- (Terraform)[https://www.terraform.io/]
Email: [email protected]
Twitter: https://twitter.com/David_J_Eddy
- Create a key pair in your AWS console in the us-east-2 region (Very important!), call the key pair aws.
- Download the
aws.pem
to a location you will remember. - Goto AWS (Route 53)[https://console.aws.amazon.com/route53/home] and either migrate a domain, or purchase / setup a new domain.
- Goto AWS (Certificate Manager)[https://us-east-2.console.aws.amazon.com/acm] and create a SSL/TLS certification for the domain.
cd /to/your/project/root/parent/directory
git clone https://github.com/davidjeddy/wp-terraform.git
cd wp-terraform
terraform init
cp ~/path/to/your/downloads/aws.pem ./aws.pem
terraform plan --out terraform.plan --var-file=./variables.tfvars
terraform apply terraform.plan
When you are all done remove all the created resources using
terraform destroy