diff --git a/src/domains/citizen-auth-app/09_function_profile.tf b/src/domains/citizen-auth-app/09_function_profile.tf index 242dfaada..c6e7a0a66 100644 --- a/src/domains/citizen-auth-app/09_function_profile.tf +++ b/src/domains/citizen-auth-app/09_function_profile.tf @@ -121,7 +121,7 @@ locals { # Login Email variables MAGIC_LINK_SERVICE_API_KEY = data.azurerm_key_vault_secret.ioweb_profile_function_api_key.value - MAGIC_LINK_SERVICE_PUBLIC_URL = format("https://%s-%s-%s-ioweb-profile-fn.azurewebsites.net", var.prefix, var.env_short, var.location_short) + MAGIC_LINK_SERVICE_PUBLIC_URL = format("https://%s-auth-webprof-func-01.azurewebsites.net", local.common_project_itn) IOWEB_ACCESS_REF = "https://ioapp.it" # diff --git a/src/domains/ioweb-app/07_apim_itn.tf b/src/domains/ioweb-app/07_apim_itn.tf index e0c4365ab..a648edd7d 100644 --- a/src/domains/ioweb-app/07_apim_itn.tf +++ b/src/domains/ioweb-app/07_apim_itn.tf @@ -7,7 +7,7 @@ module "apim_itn_bff_api" { product_ids = ["io-web-api"] subscription_required = false - service_url = format(local.bff_backend_url, module.function_ioweb_profile.default_hostname) + service_url = format(local.bff_backend_url, data.azurerm_linux_function_app.function_web_profile.default_hostname) description = "Bff API for IO Web platform" display_name = "IO Web - Bff" diff --git a/src/domains/ioweb-app/07_apim_v2.tf b/src/domains/ioweb-app/07_apim_v2.tf index d445e9daa..2513dd7fc 100644 --- a/src/domains/ioweb-app/07_apim_v2.tf +++ b/src/domains/ioweb-app/07_apim_v2.tf @@ -7,7 +7,7 @@ module "apim_v2_bff_api" { product_ids = ["io-web-api"] subscription_required = false - service_url = format(local.bff_backend_url, module.function_ioweb_profile.default_hostname) + service_url = format(local.bff_backend_url, data.azurerm_linux_function_app.function_web_profile.default_hostname) description = "Bff API for IO Web platform" display_name = "IO Web - Bff" diff --git a/src/domains/ioweb-app/99_data.tf b/src/domains/ioweb-app/99_data.tf index 3a7fee6a8..82ec45963 100644 --- a/src/domains/ioweb-app/99_data.tf +++ b/src/domains/ioweb-app/99_data.tf @@ -23,4 +23,13 @@ data "azurerm_key_vault" "key_vault_common" { data "azurerm_key_vault_secret" "io_fn3_services_key_secret" { name = "ioweb-profile-api-key-apim" key_vault_id = data.azurerm_key_vault.key_vault_common.id +} + +########################### +# Function io-web-profile # +########################### + +data "azurerm_linux_function_app" "function_web_profile" { + name = format("%s-webprof-func-01", local.short_project_itn) + resource_group_name = format("%s-webprof-rg-01", local.short_project_itn) } \ No newline at end of file diff --git a/src/domains/ioweb-app/README.md b/src/domains/ioweb-app/README.md index cf75d31cb..17a763cc4 100644 --- a/src/domains/ioweb-app/README.md +++ b/src/domains/ioweb-app/README.md @@ -65,6 +65,7 @@ | [azurerm_key_vault_secret.io_fn3_services_key_secret](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.spid_login_api_key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.spid_login_jwt_pub_key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source | +| [azurerm_linux_function_app.function_web_profile](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/linux_function_app) | data source | | [azurerm_log_analytics_workspace.log_analytics](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/log_analytics_workspace) | data source | | [azurerm_monitor_action_group.email](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/monitor_action_group) | data source | | [azurerm_monitor_action_group.error_action_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/monitor_action_group) | data source |