AWS Gateway Load Balancer Module
This module creates a single Gateway Load Balancer (GWLB). Routes from other VPCs can direct traffic towards the GWLB
through the use of a separate module gwlb_endpoint_set
.
Attaching new targets to the pre-existing GWLB
This module is not intended to be used to attach extra tagets to a pre-exising Gateway Load Balancer and its Target Group. Instead, use this snippet:
resource aws_lb_target_group_attachment this {
target_group_arn = aws_lb_target_group.this.arn
target_id = aws_instance.this.id
}
Reference
Requirements
Name | Version |
---|---|
terraform | >= 1.0.0, < 2.0.0 |
aws | ~> 5.17 |
Providers
Name | Version |
---|---|
aws | ~> 5.17 |
Modules
No modules.
Resources
Name | Type |
---|---|
aws_lb.this | resource |
aws_lb_listener.this | resource |
aws_lb_target_group.this | resource |
aws_lb_target_group_attachment.this | resource |
aws_vpc_endpoint_service.this | resource |
aws_vpc_endpoint_service_allowed_principal.this | resource |
aws_caller_identity.current | data source |
aws_partition.this | data source |
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
acceptance_required | Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false | bool | false | no |
allowed_principals | List of AWS Principal ARNs who are allowed access to the GWLB Endpoint Service. For example ["arn:aws:iam::123456789000:root"] . | list(string) | [] | no |
deregistration_delay | See the aws provider documentation. | number | null | no |
enable_lb_deletion_protection | Whether to enable deletion protection on the gateway loadbalancer. | bool | false | no |
endpoint_service_tags | Map of AWS tags to apply to the created GWLB Endpoint Service. These tags are applied after the global_tags . | map(string) | {} | no |
global_tags | Map of AWS tags to apply to all the created resources. | map(string) | {} | no |
health_check_enabled | See the aws provider documentation. | bool | null | no |
health_check_interval | Approximate amount of time, in seconds, between health checks of an individual target. Minimum 5 and maximum 300 seconds. | number | 5 | no |
health_check_matcher | See the aws provider documentation. | string | null | no |
health_check_path | See the aws provider documentation. | string | null | no |
health_check_port | The port on a target to which the load balancer sends health checks. | number | 80 | no |
health_check_protocol | Protocol to use when communicating with health_check_port . Either HTTP, HTTPS, or TCP. | string | "TCP" | no |
health_check_timeout | After how many seconds to consider the health check as failed without a response. Minimum 2 and maximum 120. Required to be null when health_check_protocol is TCP. | number | null | no |
healthy_threshold | The number of successful health checks required before an unhealthy target becomes healthy. Minimum 2 and maximum 10. | number | 3 | no |
lb_tags | Map of AWS tags to apply to the created Load Balancer object. These tags are applied after the global_tags . | map(string) | {} | no |
lb_target_group_tags | Map of AWS tags to apply to the created GWLB Target Group. These tags are applied after the global_tags . | map(string) | {} | no |
name | Name of the created GWLB. Must be unique per AWS region per AWS account. | string | n/a | yes |
stickiness_type | If stickiness_type is null , then attribute enabled is set to false in stickiness configuration block,value provided in type is ignored and by default the Gateway Load Balancer uses 5-tuple to maintain flow stickiness to a specific target appliance.If stickiness_type is not null , then attribute enabled is set to true in stickiness configuration blockand the stickiness type can be then customized by using value:- source_ip_dest_ip_proto for 3-tuple (Source IP, Destination IP and Transport Protocol)- source_ip_dest_ip for 2-tuple (Source IP and Destination IP)
| string | null | no |
subnets | Map of subnets where to create the GWLB. Each map's key is the availability zone name and each map's object has an attributeid identifying AWS subnet.Example for users of module subnet_set :
|
| n/a | yes |
target_instances | Map of instances to attach to the GWLB Target Group. |
| {} | no |
tg_name | Name of the created Target Group for GWLB. If not set, then value of variable name is used. | string | null | no |
unhealthy_threshold | The number of failed health checks required before a healthy target becomes unhealthy. Minimum 2 and maximum 10. | number | 3 | no |
vpc_id | AWS identifier of a VPC containing the Endpoint. | string | n/a | yes |
Outputs
Name | Description |
---|---|
endpoint_service | n/a |
target_group | n/a |