{"id":51410846,"url":"https://github.com/launchbynttdata/tf-aws-module_primitive-lb_target_group","last_synced_at":"2026-07-04T14:32:32.798Z","repository":{"id":358742847,"uuid":"1222721506","full_name":"launchbynttdata/tf-aws-module_primitive-lb_target_group","owner":"launchbynttdata","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-14T01:19:31.000Z","size":150,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T03:12:53.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://launch.nttdata.com","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/launchbynttdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T16:36:04.000Z","updated_at":"2026-06-14T01:19:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/launchbynttdata/tf-aws-module_primitive-lb_target_group","commit_stats":null,"previous_names":["launchbynttdata/tf-aws-module_primitive-lb_target_group"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/launchbynttdata/tf-aws-module_primitive-lb_target_group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-lb_target_group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-lb_target_group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-lb_target_group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-lb_target_group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/launchbynttdata","download_url":"https://codeload.github.com/launchbynttdata/tf-aws-module_primitive-lb_target_group/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-lb_target_group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35125718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-04T14:32:30.589Z","updated_at":"2026-07-04T14:32:32.791Z","avatar_url":"https://github.com/launchbynttdata.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf-aws-module_primitive-lb_target_group\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC_BY--NC--ND_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n\n## Overview\n\nThis primitive Terraform module wraps a single `aws_lb_target_group` resource. It exposes every\ndocumented argument so the target group can be used with any combination of Application,\nNetwork, or Gateway Load Balancers and any supported `target_type`.\n\n## Usage\n\nSee [`examples/complete`](./examples/complete) for a fully working example that creates a VPC and\nan HTTPS Application Load Balancer target group with health checks, stickiness, and target group\nhealth requirements.\n\n## Pre-commit hooks\n\nInstall the [pre-commit](https://pre-commit.com/) framework and run `pre-commit install` from the\nrepository root. The hook configuration in [.pre-commit-config.yaml](.pre-commit-config.yaml) runs:\n\n- `terraform fmt`, `terraform validate`, and `terraform-docs` against this module.\n- `golangci-lint` against the test code.\n- `commitlint` against commit messages.\n- `detect-secrets` against staged files using the [.secrets.baseline](.secrets.baseline) file.\n\n## Workflows\n\nThis repository ships with a single GitHub Actions workflow,\n[`pull-request-terraform-check-aws.yml`](.github/workflows/pull-request-terraform-check-aws.yml),\nwhich delegates to the reusable AWS Terraform check workflow in `launchbynttdata/launch-workflows`.\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | ~\u003e 1.10 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 5.0, \u003c 7.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_lb_target_group.target_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_connection_termination\"\u003e\u003c/a\u003e [connection\\_termination](#input\\_connection\\_termination) | Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. | `bool` | `false` | no |\n| \u003ca name=\"input_deregistration_delay\"\u003e\u003c/a\u003e [deregistration\\_delay](#input\\_deregistration\\_delay) | Amount of time (seconds) for ELB to wait before changing a deregistering target from draining to unused. Range is 0-3600. | `number` | `300` | no |\n| \u003ca name=\"input_health_check\"\u003e\u003c/a\u003e [health\\_check](#input\\_health\\_check) | Health check configuration block.\u003cbr/\u003e  enabled             = Whether health checks are enabled. Defaults to true.\u003cbr/\u003e  healthy\\_threshold   = Successes required before considering a target healthy. Range 2-10. Defaults to 3.\u003cbr/\u003e  unhealthy\\_threshold = Failures required before considering a target unhealthy. Range 2-10. Defaults to 3.\u003cbr/\u003e  interval            = Seconds between health checks. Range 5-300. Defaults to 30.\u003cbr/\u003e  timeout             = Seconds before a no-response check is considered failed. Range 2-120.\u003cbr/\u003e  protocol            = Protocol for health checks. One of TCP, HTTP, HTTPS. Defaults to HTTP.\u003cbr/\u003e  port                = Port to use for health checks. \"traffic-port\" or 1-65535. Defaults to traffic-port.\u003cbr/\u003e  path                = HTTP/HTTPS health check destination path.\u003cbr/\u003e  matcher             = HTTP/gRPC codes for a successful response. | \u003cpre\u003eobject({\u003cbr/\u003e    enabled             = optional(bool)\u003cbr/\u003e    healthy_threshold   = optional(number)\u003cbr/\u003e    unhealthy_threshold = optional(number)\u003cbr/\u003e    interval            = optional(number)\u003cbr/\u003e    timeout             = optional(number)\u003cbr/\u003e    protocol            = optional(string)\u003cbr/\u003e    port                = optional(string)\u003cbr/\u003e    path                = optional(string)\u003cbr/\u003e    matcher             = optional(string)\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_ip_address_type\"\u003e\u003c/a\u003e [ip\\_address\\_type](#input\\_ip\\_address\\_type) | Type of IP addresses used by the target group. Only valid when target\\_type is ip. One of ipv4 or ipv6. | `string` | `null` | no |\n| \u003ca name=\"input_lambda_multi_value_headers_enabled\"\u003e\u003c/a\u003e [lambda\\_multi\\_value\\_headers\\_enabled](#input\\_lambda\\_multi\\_value\\_headers\\_enabled) | Whether request and response headers exchanged with the Lambda function include arrays of values or strings. Only applies when target\\_type is lambda. | `bool` | `false` | no |\n| \u003ca name=\"input_load_balancing_algorithm_type\"\u003e\u003c/a\u003e [load\\_balancing\\_algorithm\\_type](#input\\_load\\_balancing\\_algorithm\\_type) | Algorithm used by an ALB target group. One of round\\_robin, least\\_outstanding\\_requests, or weighted\\_random. Defaults to round\\_robin. | `string` | `null` | no |\n| \u003ca name=\"input_load_balancing_anomaly_mitigation\"\u003e\u003c/a\u003e [load\\_balancing\\_anomaly\\_mitigation](#input\\_load\\_balancing\\_anomaly\\_mitigation) | Whether to enable target anomaly mitigation. Only supported with the weighted\\_random algorithm. One of on or off. Defaults to off. | `string` | `null` | no |\n| \u003ca name=\"input_load_balancing_cross_zone_enabled\"\u003e\u003c/a\u003e [load\\_balancing\\_cross\\_zone\\_enabled](#input\\_load\\_balancing\\_cross\\_zone\\_enabled) | Whether cross zone load balancing is enabled. One of true, false, or use\\_load\\_balancer\\_configuration. Defaults to use\\_load\\_balancer\\_configuration. | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name of the target group. Must be unique per region per account, max 32 characters, alphanumeric or hyphens, must not begin or end with a hyphen. Conflicts with name\\_prefix. | `string` | `null` | no |\n| \u003ca name=\"input_name_prefix\"\u003e\u003c/a\u003e [name\\_prefix](#input\\_name\\_prefix) | Prefix used to generate a unique target group name. Cannot be longer than 6 characters. Conflicts with name. | `string` | `null` | no |\n| \u003ca name=\"input_port\"\u003e\u003c/a\u003e [port](#input\\_port) | Port on which targets receive traffic. Required when target\\_type is instance, ip, or alb. Does not apply when target\\_type is lambda. | `number` | `null` | no |\n| \u003ca name=\"input_preserve_client_ip\"\u003e\u003c/a\u003e [preserve\\_client\\_ip](#input\\_preserve\\_client\\_ip) | Whether client IP preservation is enabled. Defaults vary by target\\_type and protocol; leave null to use AWS defaults. | `string` | `null` | no |\n| \u003ca name=\"input_protocol\"\u003e\u003c/a\u003e [protocol](#input\\_protocol) | Protocol used for routing traffic to the targets. One of GENEVE, HTTP, HTTPS, TCP, TCP\\_UDP, TLS, UDP, QUIC, or TCP\\_QUIC. Required when target\\_type is instance, ip, or alb. | `string` | `null` | no |\n| \u003ca name=\"input_protocol_version\"\u003e\u003c/a\u003e [protocol\\_version](#input\\_protocol\\_version) | Protocol version. Only applicable when protocol is HTTP or HTTPS. One of HTTP1, HTTP2, or GRPC. Defaults to HTTP1. | `string` | `null` | no |\n| \u003ca name=\"input_proxy_protocol_v2\"\u003e\u003c/a\u003e [proxy\\_protocol\\_v2](#input\\_proxy\\_protocol\\_v2) | Whether to enable support for proxy protocol v2 on Network Load Balancers. | `bool` | `false` | no |\n| \u003ca name=\"input_slow_start\"\u003e\u003c/a\u003e [slow\\_start](#input\\_slow\\_start) | Amount of time (seconds) for targets to warm up before the load balancer sends them a full share of requests. Range is 30-900 seconds, or 0 to disable. | `number` | `0` | no |\n| \u003ca name=\"input_stickiness\"\u003e\u003c/a\u003e [stickiness](#input\\_stickiness) | Stickiness configuration block.\u003cbr/\u003e  type            = (Required when set) lb\\_cookie, app\\_cookie, source\\_ip, source\\_ip\\_dest\\_ip, or source\\_ip\\_dest\\_ip\\_proto.\u003cbr/\u003e  enabled         = Whether stickiness is enabled. Defaults to true.\u003cbr/\u003e  cookie\\_duration = (lb\\_cookie only) Seconds to retain affinity. Range 1-604800. Defaults to 86400.\u003cbr/\u003e  cookie\\_name     = (app\\_cookie only) Application cookie name. | \u003cpre\u003eobject({\u003cbr/\u003e    type            = string\u003cbr/\u003e    enabled         = optional(bool)\u003cbr/\u003e    cookie_duration = optional(number)\u003cbr/\u003e    cookie_name     = optional(string)\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Map of tags to assign to the target group. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_target_failover\"\u003e\u003c/a\u003e [target\\_failover](#input\\_target\\_failover) | Target failover configuration. Only applicable for Gateway Load Balancer target groups.\u003cbr/\u003e  on\\_deregistration = rebalance or no\\_rebalance. Must match on\\_unhealthy.\u003cbr/\u003e  on\\_unhealthy      = rebalance or no\\_rebalance. Must match on\\_deregistration. | \u003cpre\u003eobject({\u003cbr/\u003e    on_deregistration = string\u003cbr/\u003e    on_unhealthy      = string\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_target_group_health\"\u003e\u003c/a\u003e [target\\_group\\_health](#input\\_target\\_group\\_health) | Target group health requirements. Only supported by ALB and NLB target groups.\u003cbr/\u003e  dns\\_failover.minimum\\_healthy\\_targets\\_count            = \"off\" or integer 1 to max targets.\u003cbr/\u003e  dns\\_failover.minimum\\_healthy\\_targets\\_percentage       = \"off\" or integer 1-100.\u003cbr/\u003e  unhealthy\\_state\\_routing.minimum\\_healthy\\_targets\\_count = Integer 1 to max targets. Defaults to 1.\u003cbr/\u003e  unhealthy\\_state\\_routing.minimum\\_healthy\\_targets\\_percentage = \"off\" or integer 1-100. | \u003cpre\u003eobject({\u003cbr/\u003e    dns_failover = optional(object({\u003cbr/\u003e      minimum_healthy_targets_count      = optional(string)\u003cbr/\u003e      minimum_healthy_targets_percentage = optional(string)\u003cbr/\u003e    }))\u003cbr/\u003e    unhealthy_state_routing = optional(object({\u003cbr/\u003e      minimum_healthy_targets_count      = optional(string)\u003cbr/\u003e      minimum_healthy_targets_percentage = optional(string)\u003cbr/\u003e    }))\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_target_health_state\"\u003e\u003c/a\u003e [target\\_health\\_state](#input\\_target\\_health\\_state) | Target health state configuration. Only applicable for NLB target groups with TCP or TLS protocol.\u003cbr/\u003e  enable\\_unhealthy\\_connection\\_termination = Whether the load balancer terminates connections to unhealthy targets. Defaults to true.\u003cbr/\u003e  unhealthy\\_draining\\_interval             = Time to wait for in-flight requests when a target becomes unhealthy. Range 0-360000. Defaults to 0. | \u003cpre\u003eobject({\u003cbr/\u003e    enable_unhealthy_connection_termination = optional(bool)\u003cbr/\u003e    unhealthy_draining_interval             = optional(number)\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_target_type\"\u003e\u003c/a\u003e [target\\_type](#input\\_target\\_type) | Type of target. One of instance, ip, lambda, or alb. Defaults to instance. | `string` | `\"instance\"` | no |\n| \u003ca name=\"input_vpc_id\"\u003e\u003c/a\u003e [vpc\\_id](#input\\_vpc\\_id) | Identifier of the VPC in which to create the target group. Required when target\\_type is instance, ip, or alb. | `string` | `null` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_arn\"\u003e\u003c/a\u003e [arn](#output\\_arn) | The ARN of the target group. |\n| \u003ca name=\"output_arn_suffix\"\u003e\u003c/a\u003e [arn\\_suffix](#output\\_arn\\_suffix) | The ARN suffix of the target group, for use with CloudWatch Metrics. |\n| \u003ca name=\"output_id\"\u003e\u003c/a\u003e [id](#output\\_id) | The ID of the target group (same as the arn). |\n| \u003ca name=\"output_load_balancer_arns\"\u003e\u003c/a\u003e [load\\_balancer\\_arns](#output\\_load\\_balancer\\_arns) | ARNs of the load balancers associated with the target group. |\n| \u003ca name=\"output_name\"\u003e\u003c/a\u003e [name](#output\\_name) | The name of the target group. |\n| \u003ca name=\"output_tags_all\"\u003e\u003c/a\u003e [tags\\_all](#output\\_tags\\_all) | Map of all tags assigned to the target group, including those inherited from provider default\\_tags. |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-lb_target_group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-lb_target_group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-lb_target_group/lists"}