mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #34500 Terraform changes after my latest loadtest. VPC consolidation: updated (and deployed) shared VPC so that Signoz backend can now use it - Removed eks-vpc/ directory - Moved VPC management to shared/vpc.tf - Updated shared/init.tf to reflect VPC changes Infra improvements - infra/internal_alb.tf - changed suffix from -internal to -int since I hit max 32 characters issue OTEL - OTEL Collector configuration overrides for production stability
60 lines
No EOL
1.6 KiB
HCL
60 lines
No EOL
1.6 KiB
HCL
resource "aws_security_group" "internal" {
|
|
name = "${local.prefix}-int"
|
|
vpc_id = data.terraform_remote_state.shared.outputs.vpc.vpc_id
|
|
ingress {
|
|
from_port = 0
|
|
to_port = 0
|
|
protocol = "-1"
|
|
cidr_blocks = ["0.0.0.0/0"]
|
|
ipv6_cidr_blocks = ["::/0"]
|
|
}
|
|
egress {
|
|
from_port = 0
|
|
to_port = 0
|
|
protocol = "-1"
|
|
cidr_blocks = ["0.0.0.0/0"]
|
|
ipv6_cidr_blocks = ["::/0"]
|
|
}
|
|
}
|
|
|
|
resource "aws_lb" "internal" {
|
|
name = "${local.prefix}-int"
|
|
internal = true
|
|
security_groups = [
|
|
resource.aws_security_group.internal.id,
|
|
]
|
|
subnets = data.terraform_remote_state.shared.outputs.vpc.private_subnets
|
|
idle_timeout = 905
|
|
drop_invalid_header_fields = true
|
|
}
|
|
|
|
resource "aws_lb_listener" "internal" {
|
|
load_balancer_arn = resource.aws_lb.internal.arn
|
|
port = 80
|
|
protocol = "HTTP"
|
|
|
|
default_action {
|
|
type = "forward"
|
|
target_group_arn = resource.aws_lb_target_group.internal.arn
|
|
}
|
|
}
|
|
|
|
resource "aws_lb_target_group" "internal" {
|
|
name = "${local.prefix}-int"
|
|
protocol = "HTTP"
|
|
target_type = "ip"
|
|
port = "80"
|
|
vpc_id = data.terraform_remote_state.shared.outputs.vpc.vpc_id
|
|
deregistration_delay = 30
|
|
|
|
load_balancing_algorithm_type = "least_outstanding_requests"
|
|
|
|
health_check {
|
|
path = "/healthz"
|
|
matcher = "200"
|
|
timeout = 10
|
|
interval = 15
|
|
healthy_threshold = 5
|
|
unhealthy_threshold = 5
|
|
}
|
|
} |