lb

devops-workflow/lb/aws

Terraform Module HCL AWS

A Terraform module to create an AWS new style Load Balancer (ALB/NLB) and associated resources.

Install
module "lb" {
source = "devops-workflow/lb/aws"
version = "3.50.0"
}
plain text: /constructs/tfmod-devops-workflow-lb-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-alb A Terraform module containing common configurations for an AWS new style Load Balancer (ALB/NLB). Available through the terraform registry. NOTE: There has been significant changes to the upstream module and this README has not been updated yet. | Branch | Build status | | --- | --- | | master | ![CircleCI](https://circleci.com/gh/devops-workflow/terraform-aws-lb) | | master (upstream) | ![TravisCI](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb) | Assumptions You want to create a set of resources for the ALB: namely an associated target group and listener. You've created a Virtual Private Cloud (VPC) + subnets where you intend to put this ALB. You have one or more security groups to attach to the ALB. You want to configure a listener for HTTPS/HTTP You've

Inputs (50)
NameTypeDescriptionDefault
subnetsanyA list of subnets to associate with the LB. e.g. ['subnet-1a2b3c4d','subnet-1a2b required
vpc_idanyVPC id where the LB and other resources will be deployed. required
nameanyBase name for resource required
environmentanyEnvironment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. required
owneranyTAG: Owner of the service"UNDEF-LB"
namespace-organyPrefix name with the organization. If true, format is: <org>-<env namespaced namfalse
idle_timeoutanyThe time in seconds that the connection is allowed to be idle"60"
internalanyBoolean determining if the LB is internal or externally facing.true
backend_portanyThe port the service on the EC2 instances listen on.80
health_check_healthy_thresholdanyNumber of consecutive positive health checks before a backend instance is consid3
health_check_pathanyThe URL the ELB should use for health checks. e.g. /health"/"
instance_http_portsanyBackend HTTP instance (target group) ports""
security_groupsanyThe security groups with which we associate the LB. e.g. ["sg-edcd9784","sg-edcd[]
backend_protocolanyThe protocol the backend service speaks. Options: HTTP, HTTPS, TCP, SSL (secure "HTTP"
lb_tcp_portsanyFrontend TCP listener ports""
target_typeanyType for targets for target group. Can be: instance or ip"instance"
health_check_unhealthy_thresholdanyNumber of consecutive positive health checks before a backend instance is consid3
enable_cross_zone_load_balancinganyEnable cross-zone load balancing on NLBfalse
lb_http_portsanyFrontend HTTP listener ports""
enable_logginganyEnable the LB to write log entries to S3.false
teamanyTAG: Department/team of people responsible for service"UNDEF-LB"
attributesanySuffix name with additional attributes (policy, role, etc.)[]
tagsanyA map of additional tags{}
lb_https_portsanyFrontend HTTPS listener ports""
… and 10 more inputs
Outputs (23)
target_group_tcp_arns — ARNs of the TCP target groups. Useful for passing to your Auto Scaling group module.
target_group_https_ids — IDs of the HTTPS target groups
arn — ARN of the LB itself. Useful for debug output, for example when attaching a WAF.
id — The ID of the LB we created.
listener_http_ids — The IDs of the HTTP LB Listeners
listener_tcp_arns — The ARNs of the network TCP LB Listeners
listener_tcp_ids — The IDs of the network TCP LB Listeners
target_group_http_arns — ARNs of the HTTP target groups. Useful for passing to your Auto Scaling group module.
target_group_http_ids — IDs of the HTTP target groups
arn_suffix — ARN suffix of the LB itself. Useful for debug output, for example when attaching a WAF.
listener_arns — ARNs of all the LB Listeners
listener_ids — IDs of all the LB Listeners
target_group_https_arns — ARNs of the HTTPS target groups. Useful for passing to your Auto Scaling group module.
target_group_arns — ARNs of all the target groups. Useful for passing to your Auto Scaling group module.
target_group_ids — IDs of all the target groups
principal_account_id — The AWS-owned account given permissions to write your LB logs to S3.
dns_name — The DNS name of the LB presumably to be used with a friendlier CNAME.
zone_id — The zone_id of the LB to assist with creating DNS records.
listener_http_arns — The ARNs of the HTTP LB Listeners
listener_https_arns — The ARNs of the HTTPS LB Listeners
listener_https_ids — The IDs of the HTTPS LB Listeners
target_group_arns_suffix — ARNs suffix of all the target groups. Useful for passing to your Auto Scaling group module.
target_group_tcp_ids — IDs of the TCP target groups
Details
FrameworkTerraform Module
LanguageHCL
Version3.50.0
Cloud AWS
★ Stars3
Forks6
Total downloads8.9k
Inputs50
Outputs23
Examples7
LicenseMIT
Namespacedevops-workflow
Updated