35 lines
1006 B
Terraform
35 lines
1006 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
|
|
authentication_required = 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
|
|
authentication_required = each.value.authentication_required
|
|
})
|
|
|
|
filename = "../conf.d/${each.key}.tryton.geeraert.eu.conf"
|
|
|
|
}
|