Skip to content

Commit

Permalink
Merge branch 'main' into EC-357-migrazione-risorse-nei-moduli-di-core…
Browse files Browse the repository at this point in the history
…-prod-ai-2
  • Loading branch information
Krusty93 authored Sep 3, 2024
2 parents 61f38e1 + 11090c9 commit 58aadd3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down
13 changes: 9 additions & 4 deletions src/core/app_backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/core/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 2 additions & 2 deletions src/core/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 58aadd3

Please sign in to comment.