βοΈ Check out the tutorial here
- Create the IAM user and apply the required permissions
- Generate the AWS CLI access keys in the IAM console or Identity Center (SSO)
- Install and configure the AWS CLI
- Configure the Codestar Connection
- Clone this repository
- Fork the
nodejs-express-boilerplaterepository
- Located in the "
main.tf" file in each module - Configure an additional AWS CLI profile:
aws configure --profile profile-nameaws configure sso --profile profile-name
# provider "aws" {
profile = "profile-name" <--- optional
# }- Or use the
[default]AWS CLI profile
- Option 1 - Add a "
terraform.tfvars" file in each module directory - Option 2 - Set the default variables directly in the module block in the "
main.tf" file
terraform init
terraform plan
terraform apply- Virtual Private Cloud (VPC)
- Subnets
- Internet Gateway
- Route Tables
- NAT Gateway
- Application Load Balancer (ALB)
- ALB HTTP Listener
- ALB Listener Rules
- Target Groups
- Target Group Health Checks
- IAM Roles & Policies
- Security Groups
- Systems Manager Parameter Store (SSM)
- Elastic Container Registry (ECR)
- Elastic Container Service (ECS)
- ECS Cluster
- ECS Task Definition
- ECS Service
- CodePipeline
- CodeBuild
- CodeDeploy
- S3 Bucket Artifacts
- Add a root module and connect the child module outputs in module blocks
- Configure default tags for AWS resources
- Optional: Refactor the monolithic Terraform configuration into environments
- Migrate the local
terraform.tfstateto a remote S3 backend - Configure CI/CD for Terraform using the hashicorp/terraform prebuilt image (one-click deployments)
- Lock the provider version