Module: ecs-web-app
A Terraform module which implements a web app on ECS and supporting AWS resources.
Usage
For a complete example, see examples/complete.
For automated tests of the complete example using bats and Terratest (which test and deploy the example on AWS), see test.
Other examples:
- without authentication - without authentication
- with Google OIDC authentication - with Google OIDC authentication
- with Cognito authentication - with Cognito authentication
module "default_backend_web_app" {
source = "cloudposse/ecs-web-app/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "testing"
name = "appname"
vpc_id = module.vpc.vpc_id
alb_ingress_unauthenticated_listener_arns = module.alb.listener_arns
alb_ingress_unauthenticated_listener_arns_count = 1
aws_logs_region = "us-east-2"
ecs_cluster_arn = aws_ecs_cluster.default.arn
ecs_cluster_name = aws_ecs_cluster.default.name
ecs_security_group_ids = [module.vpc.vpc_default_security_group_id]
ecs_private_subnet_ids = module.subnets.private_subnet_ids
alb_ingress_healthcheck_path = "/healthz"
alb_ingress_unauthenticated_paths = ["/*"]
codepipeline_enabled = false
container_environment = [
{
name = "COOKIE"
value = "cookiemonster"
},
{
name = "PORT"
value = "80"
}
]
}