In the previous articles we stood up LocalStack and configured Terraform to plan a deployment. Next we will deploy an ALB to the platform and get its address so that we can use it in the next time.
For this we will create a number of AWS Configurations
- VPC to deploy into.
- Networking to allow the ALB to be deployed and connect to the ECS instance.
- SecurityGroups to manage all the network egress / ingress between services.
- ALB the Application Load Balancer.
This is a lot of configuration items so they are avaiable in the following branch.
git switch alb
First we will plan and then apply the changes if that is green, by using the following commands.
terraform plan
terraform apply --auto-approve
Once it has been deployed you should get the following output
alb = "http://alb.elb.localhost.localstack.cloud:4566/"
We will use this address in a future request to confirm the API has been deployed correctly.