diff --git a/src/core/README.md b/src/core/README.md index 4a178e321..4fdd3043c 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -216,6 +216,7 @@ | [azurerm_key_vault_secret.apim_services_subscription_key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.app_backend_ALLOW_MYPORTAL_IP_SOURCE_RANGE](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.app_backend_API_KEY](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | +| [azurerm_key_vault_secret.app_backend_APP_CITIZEN_APIM_KEY](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.app_backend_APP_MESSAGES_API_KEY](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.app_backend_APP_MESSAGES_BETA_FISCAL_CODES](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.app_backend_CGN_API_KEY](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | @@ -255,6 +256,8 @@ | [azurerm_key_vault_secret.smtp](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_linux_function_app.app_messages_1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | | [azurerm_linux_function_app.app_messages_2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | +| [azurerm_linux_function_app.citizen_func_01](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | +| [azurerm_linux_function_app.citizen_func_02](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | | [azurerm_linux_function_app.eucovidcert](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | | [azurerm_linux_function_app.function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | | [azurerm_linux_function_app.function_assets_cdn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | diff --git a/src/core/app_backend.tf b/src/core/app_backend.tf index 3f4911473..e32b62738 100644 --- a/src/core/app_backend.tf +++ b/src/core/app_backend.tf @@ -42,7 +42,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://${data.azurerm_linux_function_app.eucovidcert.default_hostname}/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_CITIZEN_APIM_KEY.value LOLLIPOP_API_URL = "https://${data.azurerm_linux_function_app.lollipop_function.default_hostname}" LOLLIPOP_API_KEY = data.azurerm_key_vault_secret.app_backend_LOLLIPOP_ITN_API_KEY.value TRIAL_SYSTEM_API_URL = "https://ts-p-itn-api-func-01.azurewebsites.net" # PROD-TRIAL subscription @@ -279,19 +279,19 @@ locals { IS_APPBACKENDLI = "false" // FUNCTIONS API_URL = "https://${data.azurerm_linux_function_app.function_app[1].default_hostname}/api/v1" - APP_MESSAGES_API_URL = "https://${data.azurerm_linux_function_app.app_messages_1.default_hostname}/api/v1" + APP_MESSAGES_API_URL = "https://api-app.internal.io.pagopa.it/messages/l1/api/v1" } app_settings_l2 = { IS_APPBACKENDLI = "false" // FUNCTIONS API_URL = "https://${data.azurerm_linux_function_app.function_app[1].default_hostname}/api/v1" - APP_MESSAGES_API_URL = "https://${data.azurerm_linux_function_app.app_messages_2.default_hostname}/api/v1" + APP_MESSAGES_API_URL = "https://api-app.internal.io.pagopa.it/messages/l2/api/v1" } app_settings_li = { IS_APPBACKENDLI = "true" // FUNCTIONS API_URL = "https://${data.azurerm_linux_function_app.function_app[1].default_hostname}/api/v1" # not used - APP_MESSAGES_API_URL = "https://${data.azurerm_linux_function_app.app_messages_1.default_hostname}/api/v1" # not used + APP_MESSAGES_API_URL = "https://api-app.internal.io.pagopa.it/messages/l1/api/v1" # not used } } @@ -465,6 +465,11 @@ data "azurerm_key_vault_secret" "app_backend_APP_MESSAGES_API_KEY" { key_vault_id = data.azurerm_key_vault.key_vault_common.id } +data "azurerm_key_vault_secret" "app_backend_APP_CITIZEN_APIM_KEY" { + name = "appbackend-APP-CITIZEN-APIM-KEY" + key_vault_id = data.azurerm_key_vault.key_vault_common.id +} + data "azurerm_key_vault_secret" "app_backend_APP_MESSAGES_BETA_FISCAL_CODES" { name = "appbackend-APP-MESSAGES-BETA-FISCAL-CODES" key_vault_id = data.azurerm_key_vault.key_vault_common.id diff --git a/src/core/data.tf b/src/core/data.tf index 9f1a90865..c30e0fe91 100644 --- a/src/core/data.tf +++ b/src/core/data.tf @@ -283,6 +283,16 @@ data "azurerm_linux_function_app" "app_messages_2" { name = "${local.project}-app-messages-fn-2" } +data "azurerm_linux_function_app" "citizen_func_01" { + resource_group_name = "io-p-itn-msgs-rg-01" + name = "io-p-itn-msgs-citizen-func-01" +} + +data "azurerm_linux_function_app" "citizen_func_02" { + resource_group_name = "io-p-itn-msgs-rg-01" + name = "io-p-itn-msgs-citizen-func-02" +} + # # ELT # diff --git a/src/core/env/prod/terraform.tfvars b/src/core/env/prod/terraform.tfvars index d7cf7f363..a139ae1de 100644 --- a/src/core/env/prod/terraform.tfvars +++ b/src/core/env/prod/terraform.tfvars @@ -98,8 +98,8 @@ apim_publisher_name = "IO" apim_v2_sku = "Premium_2" apim_autoscale = { enabled = true - default_instances = 2 - minimum_instances = 2 + default_instances = 5 + minimum_instances = 4 maximum_instances = 6 scale_out_capacity_percentage = 50 scale_out_time_window = "PT3M"