diff --git a/src/common/_modules/app_backend/app_settings.tf b/src/common/_modules/app_backend/app_settings.tf index 1308d53f0..993c797ec 100644 --- a/src/common/_modules/app_backend/app_settings.tf +++ b/src/common/_modules/app_backend/app_settings.tf @@ -38,7 +38,7 @@ locals { CGN_OPERATOR_SEARCH_API_KEY = data.azurerm_key_vault_secret.app_backend_CGN_OPERATOR_SEARCH_API_KEY_PROD.value EUCOVIDCERT_API_URL = "https://${var.backend_hostnames.eucovidcert}/api/v1" EUCOVIDCERT_API_KEY = data.azurerm_key_vault_secret.fn_eucovidcert_API_KEY_APPBACKEND.value - APP_MESSAGES_API_KEY = data.azurerm_key_vault_secret.app_backend_APP_MESSAGES_API_KEY.value + APP_MESSAGES_API_KEY = data.azurerm_key_vault_secret.app_backend_APP_MESSAGES_API_KEY[(var.index - 1) % 2].value LOLLIPOP_API_URL = "https://${var.backend_hostnames.lollipop}" LOLLIPOP_API_KEY = data.azurerm_key_vault_secret.app_backend_LOLLIPOP_ITN_API_KEY.value TRIAL_SYSTEM_API_URL = "https://${var.backend_hostnames.trial_system_api}" # PROD-TRIAL subscription diff --git a/src/common/_modules/app_backend/data_kv.tf b/src/common/_modules/app_backend/data_kv.tf index 4bcad1926..1b64a131b 100644 --- a/src/common/_modules/app_backend/data_kv.tf +++ b/src/common/_modules/app_backend/data_kv.tf @@ -71,7 +71,13 @@ data "azurerm_key_vault_secret" "app_backend_PECSERVER_ARUBA_TOKEN_SECRET" { } data "azurerm_key_vault_secret" "app_backend_APP_MESSAGES_API_KEY" { - name = "appbackend-APP-MESSAGES-API-KEY" + count = 2 + name = count.index % 2 == 0 ? "appbackend-APP-MESSAGES-API-KEY" : "appbackend-APP-MESSAGES-API-KEY-02" + key_vault_id = var.key_vault_common.id +} + +data "azurerm_key_vault_secret" "app_backend_APP_MESSAGES_API_KEY_02" { + name = "appbackend-APP-MESSAGES-API-KEY-02" key_vault_id = var.key_vault_common.id } diff --git a/src/common/_modules/app_backend/main.tf b/src/common/_modules/app_backend/main.tf index 638b50f93..62628e2e4 100644 --- a/src/common/_modules/app_backend/main.tf +++ b/src/common/_modules/app_backend/main.tf @@ -34,7 +34,7 @@ module "appservice_app_backend" { allowed_subnets = var.allowed_subnets - allowed_ips = var.slot_allowed_ips + allowed_ips = var.allowed_ips subnet_id = azurerm_subnet.snet.id vnet_integration = true @@ -76,9 +76,7 @@ module "appservice_app_backend_slot_staging" { allowed_subnets = var.slot_allowed_subnets - allowed_ips = concat( - [], - ) + allowed_ips = var.slot_allowed_ips subnet_id = azurerm_subnet.snet.id vnet_integration = true diff --git a/src/common/prod/westeurope.tf b/src/common/prod/westeurope.tf index e51b5653a..9d15d4cc9 100644 --- a/src/common/prod/westeurope.tf +++ b/src/common/prod/westeurope.tf @@ -497,7 +497,7 @@ module "app_backend_li_weu" { // aks prod01 "51.105.109.140/32" ]) - slot_allowed_ips = module.monitoring_weu.appi.reserved_ips + slot_allowed_ips = [] apim_snet_address_prefixes = module.apim_weu.snet.address_prefixes app_settings_override = local.app_backendli.app_settings_override