mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-27 21:29:33 +01:00
2ba0181dbe
* Replace v0.11 bracket type hints with Terraform v0.12 list expressions * Use expression syntax instead of interpolated strings, where suggested * Update AWS tutorial and worker pools documentation * Define Terraform and plugin version requirements in versions.tf * Require aws ~> 2.7 to support Terraform v0.12 * Require ct ~> 0.3.2 to support Terraform v0.12
49 lines
1.1 KiB
HCL
49 lines
1.1 KiB
HCL
# Target groups of instances for use with load balancers
|
|
|
|
resource "aws_lb_target_group" "workers-http" {
|
|
name = "${var.name}-workers-http"
|
|
vpc_id = var.vpc_id
|
|
target_type = "instance"
|
|
|
|
protocol = "TCP"
|
|
port = 80
|
|
|
|
# HTTP health check for ingress
|
|
health_check {
|
|
protocol = "HTTP"
|
|
port = 10254
|
|
path = "/healthz"
|
|
|
|
# NLBs required to use same healthy and unhealthy thresholds
|
|
healthy_threshold = 3
|
|
unhealthy_threshold = 3
|
|
|
|
# Interval between health checks required to be 10 or 30
|
|
interval = 10
|
|
}
|
|
}
|
|
|
|
resource "aws_lb_target_group" "workers-https" {
|
|
name = "${var.name}-workers-https"
|
|
vpc_id = var.vpc_id
|
|
target_type = "instance"
|
|
|
|
protocol = "TCP"
|
|
port = 443
|
|
|
|
# HTTP health check for ingress
|
|
health_check {
|
|
protocol = "HTTP"
|
|
port = 10254
|
|
path = "/healthz"
|
|
|
|
# NLBs required to use same healthy and unhealthy thresholds
|
|
healthy_threshold = 3
|
|
unhealthy_threshold = 3
|
|
|
|
# Interval between health checks required to be 10 or 30
|
|
interval = 10
|
|
}
|
|
}
|
|
|