Files
Reverse_proxy_Nginx/terraform/module.tf
T

34 lines
911 B
Terraform

terraform {
required_version = "> 0.8.0"
}
variable "nginx_sites" {
type = map(object({
service = string
proxy_cache = bool
extra-value = string
extra_value_bool = bool
http2_bool = bool
proxy_pass_https = bool
}))
}
resource "local_file" "nginx"{
for_each = var.nginx_sites
content = templatefile("nginx_config.tftpl", {
name_site = each.key
name_service = each.value.service
proxy_cache = each.value.proxy_cache
extra_value_bool = each.value.extra_value_bool
extra-value = each.value.extra-value
http2_bool = each.value.http2_bool
proxy_pass_https = each.value.proxy_pass_https
})
filename = "../conf.d/${each.key}.tryton.geeraert.eu.conf"
}