Init:
cd terraform
terraform init
Use Elastic Container Registry
to store docker image:
terraform apply --target aws_ecr_repository.app
Login to Elastic Container Repository
:
$(aws ecr get-login --region $(terraform output aws_region) --no-include-email)
Build and publish docker:
docker build -t app ..
docker tag app $(terraform output app-repo):latest
docker push $(terraform output app-repo):latest
Review:
terraform plan
Deploy:
terraform apply
Test:
curl $(terraform output alb_dns_name)
Destroy:
terraform destroy