Skip to content

akhan4u/wordpress-terraform-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordpress-terraform-deployment

MIT License Say Thanks

Deploys WordPress on EC2 instance with RDS server.

Pre-Requisites

Install Terraform and make sure it's on your PATH, however the current script was created on below terraform version:

Terraform v0.11.13

Introduction

Uses terraform to deploy wordpress on EC2 instance with AWS RDS.

Following resources are created :

  1. AWS VPC.
  2. AWS Subnet for VPC.
  3. AWS Internet Gateway.
  4. Route table entry and associations.
  5. Security Group exposing Port 22, 80 & 3306.
  6. A RDS instance created with database for WordPress.
  7. An AWS EC2 Instance.
  8. Remote provisioner to download, install and configure wordpress docker container after EC2 deployment.

Running it Manually

  1. Sign up for AWS.
  2. Configure your AWS credentials using one of the supported methods for AWS CLI tools, such as setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. If you're using the ~/.aws/config file for profiles then export AWS_SDK_LOAD_CONFIG as "True".
  3. Install Terraform and make sure it's on your PATH.
  4. Run terraform init.
  5. Run terraform apply.
  6. 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.

WordPress Welcome Page

Disclaimer!!

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.

About

Deploys WordPress on EC2 instance with RDS server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages