From 453922874c15406e9a3b77c5a5049dd65d30c79f Mon Sep 17 00:00:00 2001 From: anniehedgpeth Date: Wed, 4 Oct 2023 13:27:22 -0600 Subject: [PATCH] add count to license lookup --- tests/private-active-active/data.tf | 2 ++ tests/private-tcp-active-active/data.tf | 2 ++ tests/public-active-active/data.tf | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/private-active-active/data.tf b/tests/private-active-active/data.tf index eab79d44..9c6861dc 100644 --- a/tests/private-active-active/data.tf +++ b/tests/private-active-active/data.tf @@ -17,6 +17,8 @@ data "azurerm_key_vault_secret" "vm_key" { } data "azurerm_key_vault_secret" "tfe_license" { + count = var.tfe_license_secret_name == null ? 0 : 1 + name = var.tfe_license_secret_name key_vault_id = var.key_vault_id } diff --git a/tests/private-tcp-active-active/data.tf b/tests/private-tcp-active-active/data.tf index 4c1bafea..39f5a1f7 100644 --- a/tests/private-tcp-active-active/data.tf +++ b/tests/private-tcp-active-active/data.tf @@ -22,6 +22,8 @@ data "azurerm_key_vault_secret" "ca_key" { } data "azurerm_key_vault_secret" "tfe_license" { + count = var.tfe_license_secret_name == null ? 0 : 1 + name = var.tfe_license_secret_name key_vault_id = var.key_vault_id } diff --git a/tests/public-active-active/data.tf b/tests/public-active-active/data.tf index 6094e0f7..0b366133 100644 --- a/tests/public-active-active/data.tf +++ b/tests/public-active-active/data.tf @@ -17,6 +17,8 @@ data "azurerm_key_vault_secret" "vm_key" { } data "azurerm_key_vault_secret" "tfe_license" { + count = var.tfe_license_secret_name == null ? 0 : 1 + name = var.tfe_license_secret_name key_vault_id = var.key_vault_id }