This project has two parts:
- Terraform
- Node API
- Install terraform and aws-cli
- Install nodejs
- configure aws-cli
- Clone the git repository.
- Run
terraform init
inside repository
- Run
terarform validate
to validate the code - Run
terraform plan
to take a look what it will create - Run
terraform apply
to provision infrastrcture in AWS - Run
terraform destroy
to delete everything
- Run
$ cd api
$ npm install
to install dependencies$ nodemon index.js
to test API on local- If you want to use docker, a
Dockerfile
has been added to the api
- Push api docker image to ECR
- Configure ECS Cluster to use API image from ECR
- Harden security
- Add cloudfront mapped to ALB url as CDN
- Add a domain through Route53 to cloudfront
- Adapt IaC code based on above requirements.
- Refactor IaC code into modules
This is not a finished project. Its still WIP. Its free to use.