Add support for nginx streams

This commit is contained in:
2025-06-16 23:19:25 +02:00
parent b813cf8eda
commit c162944a73
10 changed files with 136 additions and 7 deletions
@@ -45,6 +45,19 @@ locals {
}
services_config_checksum = sha256(jsonencode(local.services_config))
streams_config = {
for k, v in var.streams : "${k}.conf" => templatefile("${path.module}/resources/nginx/streams.d/stream.conf.tpl", {
name = k
port = v.port
upstream = v.upstream
custom_snippet = v.custom_snippet
upstream_port = coalesce(v.upstream_port, v.port)
resolver = v.resolver
protocol = upper(v.protocol)
})
}
streams_config_checksum = sha256(jsonencode(local.streams_config))
auth_script = file("${path.module}/resources/auth/auth_server.py")
auth_script_checksum = sha256(local.auth_script)