- IAM
- Route53 subdomain
- Networking:
- VPC
- Public and private subnets
- Routing tables
- Internet Gateway
- Security Groups
- Load Balancers, Listeners, and Target Groups
- IAM Roles and Policies
- ECS:
- Task Definition with flagsmith:latest image
- Cluster
- Service
- RDS
- Secrets with Parameter Store
- Logs
-
Generate certificate with AWS Certificate Manager
with*.yourdomain.com
pattern -
Define your variables like hosted zone domain and more desired settings in terraform.tfvars file
route53_hosted_zone = "yourdomain.com"
Currently containers are run on Fargate SPOT instances: ecs_service.tf:
capacity_provider_strategy { capacity_provider = "FARGATE_SPOT" weight = 100 } capacity_provider_strategy { capacity_provider = "FARGATE" weight = 0 }
-
Generate plan for infrastructure
terraform plan -out flagsmith.tfplan
-
Apply infrastructure by running
terraform apply flagsmith.tfplan
After a few minutes flagsmith will be available at your domain
you can delete a whole setup by running terraform destroy --auto-approve