Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Terraform Module for Deploying Traefik Application Proxy Containers in ECS

Notifications You must be signed in to change notification settings

forumone/terraform-ecs-traefik-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AWS ECS Traefik Module

Terraform Module for Deploying Traefik Application Proxy Containers in ECS behind a Network Load Balancer. Forwards all HTTP Traffic to HTTPS.

Requirements

  • ECS cluster
  • Network Load Balancer
  • VPC
  • Valid AWS ACM Certificate

Usage

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

}

Examples

Requirements

Name Version
terraform >= 1.3
aws >= 4.3

Providers

Name Version
aws >= 4.3

Modules

No modules.

Resources

Name Type
Traefik Application Proxy resource

Inputs

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

Outputs

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

Authors

Module is maintained by Forum One Communications.

About

Terraform Module for Deploying Traefik Application Proxy Containers in ECS

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages