You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Remote State to allow multiple engineers to work simultaneously
Use Community modules to simplify/abstract away (particularly vpc config)
Use tfsec to report and improve security posture, implementing into ci/cd to prevent security flaws being introduced
Use CI/CD to release tf, running tests (validate/tfsec etc)
Use multiple AZs with an ALB to allow for a HA setup and failure of at least one AZ
Application run in private subnets with only load balancer public facing
Use NAT Gateway to allow application internet access if required
Use Cloudwatch metric alarms / lifecycle hooks to act when success rates fall and responses times rise (scale up on error rate increase, slowing response times)
tfdocs to generate documentation
Common Tasks
Setup
Remote State Setup
cd remote-stateterraform initterraform apply
Dev
Project init
terraform initterraform workspace new devterraform plan -var-file=config/dev.tfvarterraform apply -var-file=config/dev.tfvar
Running out tf
terraform workspace select devterraform plan -var-file=config/dev.tfvarsterraform apply -var-file=config/dev.tfvars
Todo
Code Tidy
tfsec run - static code analysis for terraform stack
Add SSL Functionality to ALB - Currently not possible in my sandbox environment
Autoscaling based upon metrics for Response Time
Autoscaling based upon metrics for Success Rate - 5xx
Add all tfsec rules for fix/ignore
Migration to Containers - Faster scale up
Load Testing - Not possible against nginx welcome page - Gatling
github actions ci/cd - Potentially on push to main - apply
4000 schools * 20 classes * 30 peoples = Up to 80,000 registers being submitted around 930am ~ 3 million api calls
Potential for use of SQS or other queueing service to reduce write requirements to the database
Redis/Memcache to cache reads of class list