An open API service indexing awesome lists of open source software.

https://github.com/suhas-005/terraform-deploy-2-tier-application-aws

Deploy a 2-tier application using Terraform on AWS
https://github.com/suhas-005/terraform-deploy-2-tier-application-aws

aws ec2 multi-tier rds-mysql terraform terraform-module two-tier-architecture wordpress

Last synced: 3 months ago
JSON representation

Deploy a 2-tier application using Terraform on AWS

Awesome Lists containing this project

README

          

# Deploy Two-tier Application on AWS using Terraform

This repository will help you deploy Wordpress application in a Multi-AZ environment on AWS

Custom modules have been created for this development
- network module: creates vpc, subnets, route table and internet gaetway
- security module: creates security groups
- rds module: creates rds database
- ec2 module: creates ec2 instances and sets up wordpress on docker
- alb module: creates Load Balances listening on port 80

### Pre-requisites to run this terraform code
- Create a S3 bucket to store remote backend and specify the bucket name in ```backend.tf``` file.
- Create a Dynamo DB with Partition key as ```LockID``` and specify the DB name in ```backend.tf``` file.
- Create a ```secrets.tfvars``` and specify the password in the file as ```database_password = ```

### Run the code
```terraform init```

```terraform plan -var-file="secret.tfvars"```

```terraform apply -var-file="secret.tfvars"```

- You will get an output at the end of the code run "ELB_DNS". Use that as URL on your browser