Contact Us | Stratusphere FinOps | StratusGrid Home | Blog
GitHub: StratusGrid/terraform-aws-lb-target-group
This module creates a target group with a random name appended to the end with the proper lifecycle rules able to be replaced.
module "lb-target-group" {
source = "StratusGrid/lb-target-group/aws"
version = "1.2.0"
# source = "github.com/StratusGrid/terraform-aws-lb-target-group"
vpc_id = module.vpc_microservices.vpc_id
target_group_name_prefix = "${var.name_prefix}-app-green${local.name_suffix}"
target_group_type = "ip"
target_group_port = 443
target_group_protocol = "HTTPS"
target_group_health_interval = 10
target_group_health_path = "/"
target_group_health_response = 200
stickiness = {
type = "lb_cookie"
cookie_duration = 21600
enabled = true
}
input_tags = merge(local.common_tags, {})
}
Name | Type |
---|---|
aws_lb_target_group.this | resource |
random_id.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
input_tags | Map of tags to apply to resources | map(string) |
{ |
no |
stickiness | Stickiness configuration block to use | map(string) |
{} |
no |
target_group_hc_healthy_threshold | Number of consecutive health checks successes required before considering an unhealthy target healthy. Default is 3 | number |
3 |
no |
target_group_hc_unhealthy_threshold | Number of consecutive health check failures required before considering the target unhealthy. Default is 3 | number |
3 |
no |
target_group_health_interval | Interval for health checks | number |
10 |
no |
target_group_health_path | Path for health checks | string |
"/" |
no |
target_group_health_port | Override port for health check, otherwise this will be traffic port. | string |
"traffic-port" |
no |
target_group_health_protocol | Override protocol for health check, otherwise this will match traffic protocol | string |
"" |
no |
target_group_health_response | Response code for health indicator. Can be single, comma separated, or ranges. Default is 200 | string |
200 |
no |
target_group_health_timeout | Override timeout for health check for health check, otherwise this will be one second. | number |
5 |
no |
target_group_name_prefix | name prefix (pre-random) of target group to be created | string |
n/a | yes |
target_group_port | Port configuration for LB Target group | number |
443 |
no |
target_group_protocol | Protocol configuration for LB Target group | string |
"HTTPS" |
no |
target_group_type | Target type (ip/instance, lambda is not supported by this module) | string |
"ip" |
no |
vpc_id | ID of VPC which the resource should be created in | string |
n/a | yes |
Name | Description |
---|---|
target_group_arn | ARN of target group created by module. |
target_group_id | ID of target group created by module. |
target_group_name | Name of target group created by module. |
target_group_port | Destination port of the targets of target group created by module. |
Note: Manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml .