Skip to content

Commit

Permalink
[IOCOM-1913] Configure FIMS env variables in io-backend (#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacavallaro authored Nov 13, 2024
1 parent 2ca102f commit df1d431
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/_modules/app_backend/app_settings.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ locals {
CGN_API_KEY = data.azurerm_key_vault_secret.app_backend_CGN_API_KEY.value
IO_SIGN_API_URL = "https://${var.backend_hostnames.iosign}"
IO_SIGN_API_KEY = data.azurerm_key_vault_secret.app_backend_IO_SIGN_API_KEY.value
IO_FIMS_API_URL = "https://${var.backend_hostnames.iofims}"
IO_FIMS_API_KEY = data.azurerm_key_vault_secret.app_backend_IO_FIMS_API_KEY.value
CGN_OPERATOR_SEARCH_API_URL = "https://${var.backend_hostnames.cgnonboarding}" # prod subscription
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"
Expand All @@ -57,6 +59,7 @@ locals {
CGN_OPERATOR_SEARCH_API_BASE_PATH = "/api/v1/cgn/operator-search"
EUCOVIDCERT_API_BASE_PATH = "/api/v1/eucovidcert"
IO_SIGN_API_BASE_PATH = "/api/v1/sign"
IO_FIMS_API_BASE_PATH = "/api/v1/fims"
LOLLIPOP_API_BASE_PATH = "/api/v1"
TRIAL_SYSTEM_API_BASE_PATH = "/api/v1"
TRIAL_SYSTEM_APIM_BASE_PATH = "/manage/api/v1"
Expand Down Expand Up @@ -101,6 +104,7 @@ locals {
FF_CGN_ENABLED = 1
FF_EUCOVIDCERT_ENABLED = 1
FF_IO_SIGN_ENABLED = 1
FF_IO_FIMS_ENABLED = 0
FF_IO_WALLET_ENABLED = 1
FF_IO_WALLET_TRIAL_ENABLED = 1

Expand Down
5 changes: 5 additions & 0 deletions src/common/_modules/app_backend/data_kv.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ data "azurerm_key_vault_secret" "app_backend_IO_SIGN_API_KEY" {
key_vault_id = var.key_vault_common.id
}

data "azurerm_key_vault_secret" "app_backend_IO_FIMS_API_KEY" {
name = "funciofims-KEY-APPBACKEND"
key_vault_id = var.key_vault_common.id
}

data "azurerm_key_vault_secret" "app_backend_CGN_OPERATOR_SEARCH_API_KEY_PROD" {
name = "funccgnoperatorsearch-KEY-PROD-APPBACKEND"
key_vault_id = var.key_vault_common.id
Expand Down
1 change: 1 addition & 0 deletions src/common/_modules/app_backend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ variable "backend_hostnames" {
eucovidcert = string
cgn = string
iosign = string
iofims = string
cgnonboarding = string
trial_system_api = string
trial_system_apim = string
Expand Down
1 change: 1 addition & 0 deletions src/common/prod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
| [azurerm_linux_function_app.function_assets_cdn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.function_cgn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.function_profile](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.io_fims_user](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.io_sign_user](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.lollipop_function](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
| [azurerm_linux_function_app.services_app_backend_function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source |
Expand Down
5 changes: 5 additions & 0 deletions src/common/prod/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ data "azurerm_linux_function_app" "io_sign_user" {
name = "${local.project_weu_legacy}-sign-user-func"
}

data "azurerm_linux_function_app" "io_fims_user" {
resource_group_name = "${local.project_itn}-fims-rg-01"
name = "${local.project_itn}-fims-user-func-01"
}

data "azurerm_linux_function_app" "wallet_user" {
resource_group_name = "${local.project_itn}-wallet-rg-01"
name = "${local.project_itn}-wallet-user-func-02"
Expand Down
1 change: 1 addition & 0 deletions src/common/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ locals {
eucovidcert = data.azurerm_linux_function_app.eucovidcert.default_hostname
cgn = "io-p-itn-cgn-card-func-01.azurewebsites.net"
iosign = data.azurerm_linux_function_app.io_sign_user.default_hostname
iofims = data.azurerm_linux_function_app.io_fims_user.default_hostname
cgnonboarding = "io-p-itn-cgn-search-func-01.azurewebsites.net"
trial_system_api = "ts-p-itn-api-func-01.azurewebsites.net"
trial_system_apim = data.azurerm_api_management.trial_system.gateway_url
Expand Down

0 comments on commit df1d431

Please sign in to comment.