Terraform Module for Deploying Traefik Application Proxy Containers in ECS behind a Network Load Balancer. Forwards all HTTP Traffic to HTTPS.
- ECS cluster
- Network Load Balancer
- VPC
- Valid AWS ACM Certificate
module "traefik" {
source = "github.com/forumone/terraform-ecs-traefik-module?ref=v1.0.0"
vpc_id = module.vpc.vpc_id
public_subnets_ipv4 = module.vpc.public_subnets_cidr_blocks
public_subnets_ipv6 = module.vpc.public_subnets_ipv6_cidr_blocks
private_subnets_ipv4 = module.vpc.private_subnets_cidr_blocks
private_subnets_ipv6 = module.vpc.private_subnets_ipv6_cidr_blocks
nlb_arn = module.nlb.nlb_arn
ecs_cluster_name = module.ecs_cluster_name
default_acm_arn = module.acm.default.arn
autoscaling_min = 1
autoscaling_max = 2
}| Name | Version |
|---|---|
| terraform | >= 1.3 |
| aws | >= 4.3 |
| Name | Version |
|---|---|
| aws | >= 4.3 |
No modules.
| Name | Type |
|---|---|
| Traefik Application Proxy | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| vpc_id | The ID of the VPC to of the ECS cluster | string |
{} |
yes |
| nlb_arn | The ARN of the NLB to deploy to | string |
{} |
yes |
| default_acm_arn | The ARN of the Default Certificate for SSL | string |
{} |
yes |
| ecs_cluster_name | The Name of the ECS Cluster | string |
{} |
yes |
| public_subnets_ipv4 | VPC Subnets IPv4 - Public | string |
{} |
yes |
| public_subnets_ipv6 | VPC Subnets IPv6 - Public | string |
{} |
yes |
| private_subnets_ipv4 | VPC Subnets IPv4 - Private | string |
{} |
yes |
| private_subnets_ipv6 | VPC Subnets IPv6 - Private | string |
{} |
yes |
| http_port | The Name HTTP Port of the Traefik Container | string |
80 |
no |
| https_port | The Name HTTPS Port of the Traefik Container | string |
443 |
no |
| traefik_version | Traefik Container Version | string |
latest |
no |
| traefik_log_level | Traefik Log Level | string |
ERROR |
no |
| autoscaling_min | Autoscaling min | number |
2 |
no |
| autoscaling_max | Autoscaling max | number |
4 |
no |
| Name | Description |
|---|---|
| security_group_id | security_group_id |
| http_target_group_arn | http_target_group_arn |
| https_target_group_arn | https_target_group_arn |
| http_lb_listener_arn | http_lb_listener_arn |
| https_lb_listener_arn | https_lb_listener_arn |
| traefik_ecs_task_arn | traefik_ecs_task_arn |
| traefik_ecs_task_revision | traefik_ecs_task_revision |
| traefik_ecs_service_id | traefik_ecs_service_id |
Module is maintained by Forum One Communications.