diff --git a/nginx-site-available/config.tf b/nginx-site-available/config.tf index 925086a..22d79f5 100644 --- a/nginx-site-available/config.tf +++ b/nginx-site-available/config.tf @@ -17,8 +17,8 @@ locals { extra_upstreams = var.extra_upstreams extra_locations = var.extra_locations }) - cert_public = "${var.certificate.issuer_pem}${var.certificate.certificate_pem}" - cert_private = var.certificate.private_key_pem + cert_public = var.certificate != null ? "${var.certificate.issuer_pem}${var.certificate.certificate_pem}" : "" + cert_private = var.certificate != null ? var.certificate.private_key_pem : "" filenames = { nginx = "${var.hostname}.conf" auth = "${var.hostname}.auth" diff --git a/nginx-site-available/inputs.tf b/nginx-site-available/inputs.tf index c3b18e7..f5dc63d 100644 --- a/nginx-site-available/inputs.tf +++ b/nginx-site-available/inputs.tf @@ -53,7 +53,6 @@ variable "config_prefix" { type = string default = "nginx" } - variable "extra_upstreams" { type = list(object({ name = string