From 6f36ae50452b43c1080ce23f746c6fcad8dd83f7 Mon Sep 17 00:00:00 2001 From: rs1986x Date: Mon, 22 Apr 2024 15:07:29 +0200 Subject: [PATCH] feat: adding a host parameter to the target server to be able to use DNS --- modules/sb-psc-attachment/main.tf | 2 +- modules/sb-psc-attachment/variables.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sb-psc-attachment/main.tf b/modules/sb-psc-attachment/main.tf index 76be1b1..22ceb7e 100644 --- a/modules/sb-psc-attachment/main.tf +++ b/modules/sb-psc-attachment/main.tf @@ -41,7 +41,7 @@ resource "google_apigee_target_server" "target_server" { description = "Target server for ${var.name} endpoint attachment" env_id = each.value.environment_id protocol = each.value.protocol - host = google_apigee_endpoint_attachment.endpoint_attachment.host + host = coalesce(each.value.host, google_apigee_endpoint_attachment.endpoint_attachment.host) port = each.value.port is_enabled = each.value.enabled diff --git a/modules/sb-psc-attachment/variables.tf b/modules/sb-psc-attachment/variables.tf index 19a6424..b73a48f 100644 --- a/modules/sb-psc-attachment/variables.tf +++ b/modules/sb-psc-attachment/variables.tf @@ -57,6 +57,7 @@ variable "target_servers" { protocol = optional(string, "HTTP") port = optional(number, 80) enabled = optional(bool, true) + host = optional(string, null) s_sl_info = optional(object({ enabled = bool client_auth_enabled = optional(bool, null)