diff --git a/.identity/00_data.tf b/.identity/00_data.tf index 856fcfc..c56a3c3 100644 --- a/.identity/00_data.tf +++ b/.identity/00_data.tf @@ -59,8 +59,10 @@ data "azurerm_key_vault_secret" "key_vault_integration_test_subkey" { } data "azurerm_key_vault_secret" "key_vault_gpd_api_key" { - name = "gpd-api-key" - key_vault_id = data.azurerm_key_vault.key_vault.id + count = var.env_short != "p" ? 1 : 0 + + name = "gpd-api-key-test" + key_vault_id = data.azurerm_key_vault.domain_key_vault.id } data "azurerm_user_assigned_identity" "workload_identity_clientid" { diff --git a/.identity/01_github_environment.tf b/.identity/01_github_environment.tf index b4beeb3..e56669c 100644 --- a/.identity/01_github_environment.tf +++ b/.identity/01_github_environment.tf @@ -25,7 +25,7 @@ locals { "TENANT_ID" : data.azurerm_client_config.current.tenant_id, "SUBSCRIPTION_ID" : data.azurerm_subscription.current.subscription_id, "SUBKEY" : data.azurerm_key_vault_secret.key_vault_integration_test_subkey.value, - "GPD_SUBKEY" : data.azurerm_key_vault_secret.key_vault_gpd_api_key.value + "GPD_SUBKEY" : var.env_short != "p" ? data.azurerm_key_vault_secret.key_vault_gpd_api_key[0].value : "-" } env_variables = { @@ -52,7 +52,7 @@ locals { }, "GPD_SUBKEY" : { "key" : "${upper(var.env)}_GPD_SUBKEY", - "value" : data.azurerm_key_vault_secret.key_vault_gpd_api_key.value + "value" : var.env_short != "p" ? data.azurerm_key_vault_secret.key_vault_gpd_api_key[0].value : "-" }, } }