Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

ohpensource/terraform-aws-ohp-alb

Repository files navigation

Terraform Module - ALB

license

GitHub Workflow Status

GitHub tag (latest by date)

Maintainer

  • Platform Services

Description

Creates an Application Load Balancer. Requires additional work on the module to create a working NLB

Documentation

confluence

Requirements

Name Version
terraform ~> 1.0
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

Name Source Version
alb terraform-aws-modules/alb/aws ~> 6.0

Resources

Name Type
aws_caller_identity.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
bucket_name (Required) List of target groups string "" no
create_lb (Optional) Controls if the Load Balancer should be created string "true" no
default_sg_name (Optional) name of the Security group of the Application Load Balancer in case no security group is defined string "alb-sg" no
drop_invalid_header_fields (Optional) Indicates whether invalid header fields are dropped in application load balancers. Defaults to false. string "false" no
enable_cross_zone_load_balancing (Optional) Indicates whether cross zone load balancing should be enabled in application load balancers. string "false" no
enable_deletion_protection (Optional) If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false. string "true" no
enable_http2 (Optional) Indicates whether HTTP/2 is enabled in application load balancers. string "true" no
extra_ssl_certs (Optional) A list of maps describing any extra SSL certificates to apply to the HTTPS listeners. Required key/values: certificate_arn, https_listener_index (the index of the listener within https_listeners which the cert applies toward). list [] no
http_tcp_listeners (Required) List of http listeners list [] no
http_tcp_listeners_tags (Optional) A map of tags to add to all tcp listeners map {} no
https_listener_rules (Optional) A list of maps describing the Listener Rules for this ALB. Required key/values: actions, conditions. Optional key/values: priority, https_listener_index (default to https_listeners[count.index]) list [] no
https_listener_rules_tags (Optional) A map of tags to add to all https listener rules map {} no
https_listeners (Required) List of https listeners list [] no
https_listeners_tags (Optional) A map of tags to add to all https listener map {} no
idle_timeout (Optional) The time in seconds that the connection is allowed to be idle. number 60 no
internal Boolean determining if the load balancer is internal or externally facing. string "false" no
ip_address_type (Optional) The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack. string "ipv4" no
lb_tags (Optional) A map of tags to add to load balancer map {} no
listener_ssl_policy_default (Optional) The security policy if using HTTPS externally on the load balancer. string "ELBSecurityPolicy-2016-08" no
load_balancer_create_timeout (Optional) Timeout value when creating the ALB. string "10m" no
load_balancer_delete_timeout Timeout value when deleting the ALB. string "10m" no
load_balancer_type (Optional) Type of load balancer 'application' or 'network' string "application" no
load_balancer_update_timeout (Optional) Timeout value when updating the ALB. string "10m" no
name (Required) name of the Application Load Balancer string "main_alb" no
security_groups (Required) Security groups associated with the ALB list [] no
subnet_mapping (Optional) A list of subnet mapping blocks describing subnets to attach to network load balancer list [] no
subnets_id (Required) Id of the public subnet of the Application Load Balancer list [] no
tags (Required) A map of tags to add to all resources map {} no
target_group_tags (Required) A map of tags to add to all target groups map {} no
target_groups (Required) List of target groups list [] no
vpc_id (Required) Id of the VPC for the SG of the ALB string "" no

Outputs

Name Description
http_tcp_listener_arns The ARN of the TCP and HTTP load balancer listeners created.
http_tcp_listener_ids The IDs of the TCP and HTTP load balancer listeners created.
https_listener_arns The ARNs of the HTTPS load balancer listeners created.
https_listener_ids The IDs of the load balancer listeners created.
lb_arn The ID and ARN of the load balancer we created.
lb_arn_suffix ARN suffix of our load balancer - can be used with CloudWatch.
lb_dns_name The DNS name of the load balancer.
lb_id The id of the user pool
lb_zone_id The zone_id of the load balancer to assist with creating DNS records.
target_group_arn_suffixes ARN suffixes of our target groups - can be used with CloudWatch.
target_group_arns ARNs of the target groups. Useful for passing to your Auto Scaling group.
target_group_attachments ARNs of the target group attachment IDs.
target_group_names Name of the target group. Useful for passing to your CodeDeploy Deployment Group.