Deploys WordPress on EC2 instance with RDS server.
Install Terraform and make sure it's on your PATH
, however the current script was created on below terraform version:
Terraform v0.11.13
Uses terraform to deploy wordpress on EC2 instance with AWS RDS.
Following resources are created :
- AWS VPC.
- AWS Subnet for VPC.
- AWS Internet Gateway.
- Route table entry and associations.
- Security Group exposing Port 22, 80 & 3306.
- A RDS instance created with database for WordPress.
- An AWS EC2 Instance.
- Remote provisioner to download, install and configure wordpress docker container after EC2 deployment.
- Sign up for AWS.
- Configure your AWS credentials using one of the supported methods for AWS CLI tools, such as setting the
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. If you're using the~/.aws/config
file for profiles then exportAWS_SDK_LOAD_CONFIG
as "True". - Install Terraform and make sure it's on your
PATH
. - Run
terraform init
. - Run
terraform apply
. - When you're done, run
terraform destroy
.
After Complete Run it will Output the PublicIP of your WordPress EC2 Instance. Enter http://ec2-public-ip to get the default WordPress login page.
This example deploy real resources into your AWS account which can cost you money. The resources are all part of the AWS Free Tier, you are completely responsible for all AWS charges.