Skip to content

bryan-rhm/terraform-aws-alb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Load Balancer module

Basic usage example

module "alb" {
  source = "github.com/bryan-rhm/terraform-aws-alb?ref=v1.0.0"

  name                    = "my-lb"
  ssl_policy              = var.alb_ssl_policy
  subnet_ids              = var.public_subnet_ids
  security_groups         = ["sg-12345"]
  ssl_certificate_arn     = var.acm_certificate_arn
}

Requirements

Name Version
terraform >= 0.13.4
aws >= 3.43.0

Providers

Name Version
aws >= 3.43.0

Modules

No modules.

Resources

Name Type
aws_lb.alb resource
aws_lb_listener.http_listener resource
aws_lb_listener.https_listener resource

Inputs

Name Description Type Default Required
access_logs_bucket_name The S3 bucket name to store the logs in. string null no
access_logs_prefix The S3 bucket prefix. Logs are stored in the root if not configured. string null no
drop_invalid_header_fields Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). bool true no
enable_cross_zone_load_balancing If true, cross-zone load balancing of the load balancer will be enabled. This is a network load balancer feature. bool false no
enable_deletion_protection If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. bool false no
idle_timeout Sets the time in seconds that the connection is allowed to be idle for the ALB. number 60 no
internal_alb Defines if the ALB will be internal or external. If internal, it can only use ipv4 as the ip_address_type. bool false no
loadbalancer_type Defines the type of loadbalancer string "application" no
name Name of the load balancer string n/a yes
security_groups List of ids for all the security groups that will be assigned to the ALB. list(string) [] no
ssl_certificate_arn ARN of the default SSL server certificate. string null no
ssl_policy Name of the SSL Policy for the HTTPS listener. string "ELBSecurityPolicy-2016-08" no
subnet_ids List of ids for all the subnets that will be attached to the ALB. At least two subnets in two different AZs must be specified. list(string) n/a yes
tags A map of tags to assign to the ALB. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. map(any) {} no

Outputs

Name Description
output alb, http and https listeners attributes

About

Terraform module to provision application load balancers/network load balancers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages