You need to fix terraform code and/or Dockerfile.
Please
- Create your own free AWS account
- Create VPC
- Create ecs registry
- Create and push container to the registry
- Fix state.tf file. Create new terraform workspace, for instance in code we have dev
- Deploy cluster
- Go to ALB DNS name and check if you see succesfull code
- Share updated code, LB URL and your findings
- Create new terraform workspace
- terraform deploy
terraform workspace new dev
terraform apply
- Created VPC, ECR repo manually in AWS account (region: us-east-1)
- Cloned given code https://github.com/anton-demydov-zoral/tech_assignment.git and used terraform workspace dev.
- Modified code/docker-entrypoint.sh --> added fi at end of file
- Modified Dockerfile by adding executable permissions to docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh
- Built image using Docker and pushed image to created ECR repository.
- Modified state.tf file with values (bucketname, key, region, workspace_key_prefix).
- Modified alb.tf - target group health check status code from 404 to 200.
- Modified policy document - added access permissions to pull image from ECR.
- Modified Security group - In ALB SG, allow http port from 81 to 80 and allowed 8080 on TCP, egress all traffic.In Container SG, ingress all traffic on ALB SG and egress all traffic.
- Modified variables.tf file - image tag - lab to latest and ECR repository url in repo_url.
- Modified main.tf file - network configuration subnets - public and enabled assign public ip's to true, modified load balancer container port from 8888 to 8080.
- ALB URL http://dev-assignment-613199568.us-east-1.elb.amazonaws.com/