Skip to content

Commit

Permalink
fix: last fixes before apply
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-calabrese committed Sep 26, 2024
1 parent 87dbf1f commit ef004a4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common/_modules/app_backend/app_settings.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/common/_modules/app_backend/data_kv.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 2 additions & 4 deletions src/common/_modules/app_backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/common/prod/westeurope.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef004a4

Please sign in to comment.