IaC - Infraestructure as Code
Collection of IaC - Infraestructure as Code with Terraform projects
PROJECT 1: WordPress Website deployed by IAC-TERRAFORM
The objective of this project is to provision and deploy a new WordPress website using Infrastructure as Code (IaC) with Terraform, creating containerized WordPress workloads on Amazon EC2. The solution then includes migrating content from an existing WordPress site. This Terraform project is developed in a local environment and used to deploy the infrastructure to AWS Cloud.
1. Application Architecture and Tools:
The new website is deployed using IaC with Terraform, following the modular architecture described below:
- (1) VPC
- (2) public subnets in two different Availability Zones
- (1) EC2 host, which dynamically creates containers via a docker-compose.yml file for:
- - DATABASE: MySQL (wordpress_db) – container: database, port 3306 (container internal port)
- - FRONTEND: PHP – WordPress application (wordpress_app) – container: wordpress, port 80 (container internal port)
- (2) Security Groups for the EC2 instance and the Application Load Balancer (ALB)
- (1) Application Load Balancer (ALB)
- (1) Route 53 A record for the custom domain
- (1) CloudFront distribution (CDN) to provide caching for the application
- (1) ACM SSL certificate for the custom domain
- Optional: WordPress content migration by importing a backup file (with .wpress extension) from the previous site.
2. Final Implementation:
- A. Final AWS infrastructure deployment with Terraform
- B. Content Wordpress Migrationat at new Website
Finally, the new WordPress website, migrated under an IAC-deployed infrastructure using Terraform, was successfully implemented!.
Go to Details at GIT Project: https://github.com/connyval/2025_TF_SiteWP
3. Graphical Technical Design:
Keywords: IAC, TERRAFORM, DOCKER, EC2, LBL, CLOUDFRONT, ROUTE53, ACM, WORDPRESS
Diciembre 2025