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 HTTP and HTTPS . Defaults to HTTP . |
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 HTTP and HTTPS . Defaults to HTTP .(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.(Optional) success_codes - The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).(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 5 .(Optional) unhealthy_threshold - The number of consecutive health check failures required before considering a target unhealthy. Valid value range is 2 - 10. Defaults to 2 .(Optional) interval - Approximate amount of time, in seconds, between health checks of an individual target. Valid value range is 5 - 300. Defaults to 30 .(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 5 . |
object({ |
{} |
no |
load_balancing | (Optional) A load balancing configuration of the target group. load_balancing block as defined below.(Optional) algorithm - Determines how the load balancer selects targets when routing requests. Valid values are ROUND_ROBIN , LEAST_OUTSTANDING_REQUESTS or WEIGHTED_RANDOM . Defaults to ROUND_ROBIN .(Optional) anomaly_mitigation_enabled - Whether to enable target anomaly mitigation. When a target is determined to be anomalous, traffic is automatically routed away so the target has an opportunity to recover. Target anomaly mitigation is only supported by the WEIGHTED_RANDOM load balancing algorithm type. Not compatible with the slow_start_duration attribute. Defaults to false .(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 |
protocol_version | (Optional) Use HTTP1 to send requests to targets using HTTP/1.1. Supported when the request protocol is HTTP/1.1 or HTTP/2. Use HTTP2 to send requests to targets using HTTP/2. Supported when the request protocol is HTTP/2 or gRPC, but gRPC-specific features are not available. Use GRPC to send requests to targets using gRPC. Supported when the request protocol is gRPC. Defaults to HTTP1 . |
string |
"HTTP1" |
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 |
slow_start_duration | (Optional) The amount time for a newly registered targets to warm up before the load balancer sends them a full share of requests. During this period, targets receives an increasing share of requests until it reaches its fair share. Requires 30 to 900 seconds to enable, or 0 seconds to disable. Not compatible with the Least outstanding requests and Weighted random routing algorithms. |
number |
0 |
no |
stickiness_cookie | (Optional) The name of the application based cookie. AWSALB , AWSALBAPP , and AWSALBTG prefixes are reserved and cannot be used. Only needed when stickiness_type is APP_COOKIE . |
string |
null |
no |
stickiness_duration | (Optional) The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. Valid values are from 1 to 604800 (1 week). Defaults to 86400 (1 day). |
number |
86400 |
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 |
stickiness_type | (Optional) The type of sticky sessions. Valid values are LB_COOKIE or APP_COOKIE . Defaults to LB_COOKIE . |
string |
"LB_COOKIE" |
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 |
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. |
protocol_version | The protocol version to use to send requests to targets. |
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. |