Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconacm-tls-certificate
file-type-iconalb
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconlb-listener-rules
file-type-iconnlb
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconacm-tls-certificate
file-type-iconalb
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconlb-listener-rules
file-type-iconnlb
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
Elastic Load Balancer (ELB)

Elastic Load Balancer (ELB)

Deploy the Application Load Balancer (ALB) for load balancing HTTP and HTTPS, with support for routing rules and WebSockets.

Code Preview

Preview the Code

mobile file icon

main.tf

down
  • # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • # CREATE AN APPLICATION LOAD BALANCER (ALB)
  • # This template creates an ALB, the necessary security groups, and sets up the desired ALB Listeners. A single ALB is
  • # expected to serve as the load balancer for potentially multiple ECS Services and Auto Scaling Groups.
  • # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • terraform {
  • # This module is now only being tested with Terraform 0.13.x. However, to make upgrading easier, we are setting
  • # 0.12.26 as the minimum version, as that version added support for required_providers with source URLs, making it
  • # forwards compatible with 0.13.x code.
  • required_version = ">= 0.12.26"
  • }
  • # ---------------------------------------------------------------------------------------------------------------------
  • # SET MODULE DEPENDENCY RESOURCE
  • # This works around a terraform limitation where we can not specify module dependencies natively.
  • # See https://github.com/hashicorp/terraform/issues/1178 for more discussion.
  • # By resolving and computing the dependencies list, we are able to make all the resources in this module depend on the
  • # resources backing the values in the dependencies list.
  • # ---------------------------------------------------------------------------------------------------------------------
  • resource "null_resource" "dependency_getter" {
  • triggers = {
  • instance = join(",", var.dependencies)
  • }

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?