Skip to content

Yurui-Feng/notesapp-terraform-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotesApp Infrastructure

This repository contains Terraform configurations for deploying the infrastructure required by NotesApp, a simple note-taking application. The setup includes configurations for both the backend and frontend components, each hosted on AWS ECS with Fargate, behind Application Load Balancers (ALBs) with HTTPS enabled.

Directory Structure

/notesapp-infrastructure
    ├── backend
    │   ├── backend-service.tf
    │   ├── variables.tf
    │   ├── outputs.tf
    │   └── terraform.tfvars
    ├── frontend
    │   ├── frontend-service.tf
    │   ├── variables.tf
    │   ├── outputs.tf
    │   └── terraform.tfvars
    └── main.tf
  • Backend: Contains Terraform configurations for the backend service, including ECS task definitions, service, and ALB.
  • Frontend: Contains Terraform configurations for the frontend service, similar to the backend but tailored for the frontend's specific needs.
  • Shared: (If applicable) Contains configurations for shared resources like VPCs, subnets, and security groups.

Prerequisites

  • AWS Account
  • Terraform installed (v1.0.0 or higher recommended)
  • AWS CLI configured

Setup Instructions

  1. Initialize Terraform:

Navigate to each environment directory (backend or frontend) and initialize Terraform:

cd backend
terraform init

Repeat for the frontend directory.

  1. Plan Terraform Changes:

Review the changes Terraform will perform:

terraform plan
  1. Apply Terraform Changes:

Apply the changes to create the infrastructure:

terraform apply

Repeat the plan and apply steps in the frontend directory.

Security

Sensitive data like AWS credentials or other secrets should not be stored in terraform.tfvars files or within the repository. Use environment variables or a secure secret management service.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages