This project uses Terraform to manage the infrastructure of an English practice application. It configures AWS resources, including VPC, subnets, security groups, load balancers, ECS clusters, and more.
The purpose of this project is to provide a scalable and secure infrastructure, enabling efficient resource management and deployment automation.
- VPC and Subnets: Configuration of a VPC with public and private subnets.
- Security Groups: Definition of security rules to control network traffic.
- Load Balancers: Configuration of ALBs to distribute traffic between backend and frontend instances.
- ECS Clusters: Management of ECS clusters to run Docker containers.
- Auto Scaling: Configuration of auto scaling policies to automatically adjust the number of instances based on load.
- Terraform installed.
- AWS CLI configured with valid credentials.
- AWS account with appropriate permissions to create resources.
-
Clone the Repository
git clone https://github.com/phytter/infrastructure-practice-english.git cd infrastructure-practice-english -
Initialize Terraform
terraform init
-
Select the Workspace
terraform workspace select staging || terraform workspace new staging
-
Plan the Infrastructure
terraform plan -var-file="environments/staging/terraform.tfvars" -
Apply the Changes
terraform apply -var-file="environments/staging/terraform.tfvars" -
Destroy the Infrastructure (if necessary)
terraform destroy -var-file="environments/staging/terraform.tfvars"
Make sure to define the following sensitive variables in your environment or through variable files:
TF_VAR_google_client_idTF_VAR_google_client_secretTF_VAR_mongodb_urlTF_VAR_database_nameTF_VAR_opensubtitles_api_keyTF_VAR_secret_keyTF_VAR_nextauth_url
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for more details.