This module creates following resources.
aws_lb_target_group
aws_lb_target_group_attachment
(optional)
Name | Version |
---|---|
terraform | >= 1.6 |
aws | >= 5.38 |
Name | Version |
---|---|
aws | 5.58.0 |
Name | Source | Version |
---|---|---|
resource_group | tedilabs/misc/aws//modules/resource-group | ~> 0.10.0 |
Name | Type |
---|---|
aws_lb_target_group.this | resource |
aws_lb_target_group_attachment.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | (Required) Name of the target group. A maximum of 32 alphanumeric characters including hyphens are allowed, but the name must not begin or end with a hyphen. | string |
n/a | yes |
port | (Required) The number of port on which targets receive traffic, unless overridden when registering a specific target. Valid values are either ports 1-65535. | number |
n/a | yes |
protocol | (Required) The protocol to use for routing traffic to the targets. Valid values are TCP , TLS , UDP and TCP_UDP . Not valid to use UDP or TCP_UDP if dual-stack mode is enabled on the load balancer. |
string |
n/a | yes |
vpc_id | (Required) The ID of the VPC which the target group belongs to. | string |
n/a | yes |
deregistration_delay | (Optional) The time to wait for in-flight requests to complete while deregistering a target. During this time, the state of the target is draining. | number |
300 |
no |
health_check | (Optional) Health Check configuration block. The associated load balancer periodically sends requests to the registered targets to test their status. health_check block as defined below.(Optional) protocol - Protocol to use to connect with the target. The possible values are TCP , HTTP and HTTPS . Defaults to TCP .(Optional) port - The port the load balancer uses when performing health checks on targets. The default is the port on which each target receives traffic from the load balancer. Valid values are either ports 1-65535.(Optional) port_override - Whether to override the port on which each target receives trafficfrom the load balancer to a different port. Defaults to false .(Optional) path - Use the default path of / to ping the root, or specify a custom path if preferred. Only valid if the protocol is HTTP or HTTPS .(Optional) healthy_threshold - The number of consecutive health checks successes required before considering an unhealthy target healthy. Valid value range is 2 - 10. Defaults to 3 .(Optional) unhealthy_threshold - The number of consecutive health check failures required before considering a target unhealthy. Valid value range is 2 - 10. Defaults to 3 .(Optional) interval - Approximate amount of time, in seconds, between health checks of an individual target. Valid value range is 5 - 300. Defaults to 10 .(Optional) timeout - The amount of time, in seconds, during which no response means a failed health check. Valid value range is 2 - 120. Defaults to 6 when the protocol is HTTP , and 10 when the protocol is TCP or HTTPS . |
object({ |
{} |
no |
load_balancing | (Optional) A load balancing configuration of the target group. load_balancing block as defined below.(Optional) cross_zone_strategy - Determines how the load balancer routes requests across the Availability Zones. Valid values are ENABLED , DISABLED or INHERIT . Defaults to INHERIT (Use load balancer configuration). |
object({ |
{} |
no |
module_tags_enabled | (Optional) Whether to create AWS Resource Tags for the module informations. | bool |
true |
no |
preserve_client_ip | (Optional) Whether to preserve client IP addresses and ports in the packets forwarded to targets. Client IP preservation cannot be disabled if the target group protocol is UDP and TCP_UDP . Defaults to true . |
bool |
true |
no |
proxy_protocol_v2 | (Optional) Whether to enable support for proxy protocol v2 on Network Load Balancers. Before you enable proxy protocol v2, make sure that your application targets can process proxy protocol headers otherwise your application might break. Defaults to false . |
bool |
false |
no |
resource_group_description | (Optional) The description of Resource Group. | string |
"Managed by Terraform." |
no |
resource_group_enabled | (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. | bool |
true |
no |
resource_group_name | (Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with AWS or aws . |
string |
"" |
no |
stickiness_enabled | (Optional) Whether to enable the type of stickiness associated with this target group. If enabled, the load balancer binds a client’s session to a specific instance within the target group. Defaults to false . |
bool |
false |
no |
tags | (Optional) A map of tags to add to all resources. | map(string) |
{} |
no |
targets | (Optional) A set of targets to add to the target group. Each value of targets block as defined below.(Required) instance - This is the Instance ID for an instance, or the container ID for an ECS container.(Optional) port - The port on which targets receive traffic. |
set(object({ |
[] |
no |
terminate_connection_on_deregistration | (Optional) Whether to terminate active connections at the end of the deregistration timeout is reached on Network Load Balancers. Enabling this setting is particularly important for UDP and TCP_UDP target groups. Defaults to false . |
bool |
false |
no |
Name | Description |
---|---|
arn | The Amazon Resource Name (ARN) of the target group. |
arn_suffix | The ARN suffix for use with CloudWatch Metrics. |
attributes | Attributes of the Instance target group of network load balancer. |
health_check | Health Check configuration of the target group. |
id | The ID of the target group. |
load_balancers | The ARNs (Amazon Resource Name) of the load balancers associated with the target group. |
name | The name of the target group. |
port | The port number on which the target receive trrafic. |
protocol | The protocol to use to connect with the target. |
targets | A set of targets in the target group. |
type | The target type of the target group. |
vpc_id | The ID of the VPC which the target group belongs to. |