Skip to content

Commit

Permalink
[#IOPID-2488] Switch calls to newest lv function (#1295)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriele Mendolia <arcogabbo@gmail.com>
  • Loading branch information
gquadrati and arcogabbo authored Nov 8, 2024
1 parent 9e0a11e commit 1f90767
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/common/prod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
| [azurerm_subnet.admin_snet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_subnet.cosmos_api_allowed](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_subnet.itn_auth_fast_login_func_snet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_subnet.itn_auth_lv_func_snet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_subnet.itn_msgs_sending_func_snet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_subnet.services_snet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet) | data source |
| [azurerm_virtual_network.weu_beta](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/virtual_network) | data source |
Expand Down
6 changes: 6 additions & 0 deletions src/common/prod/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ data "azurerm_subnet" "itn_auth_fast_login_func_snet" {
virtual_network_name = local.core.networking.itn.vnet_common.name
}

data "azurerm_subnet" "itn_auth_lv_func_snet" {
name = "${local.project_itn}-auth-lv-func-snet-02"
resource_group_name = local.core.networking.itn.vnet_common.resource_group_name
virtual_network_name = local.core.networking.itn.vnet_common.name
}

data "azurerm_subnet" "itn_msgs_sending_func_snet" {
name = "${local.project_itn}-msgs-sending-func-snet-01"
resource_group_name = local.core.networking.itn.vnet_common.resource_group_name
Expand Down
1 change: 1 addition & 0 deletions src/common/prod/westeurope.tf
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ module "app_backend_li_weu" {
[
data.azurerm_subnet.admin_snet.id,
data.azurerm_subnet.itn_auth_fast_login_func_snet.id,
data.azurerm_subnet.itn_auth_lv_func_snet.id,
data.azurerm_subnet.itn_msgs_sending_func_snet.id
])
slot_allowed_subnets = concat([local.azdoa_snet_id["weu"]], data.azurerm_subnet.services_snet.*.id, [data.azurerm_subnet.admin_snet.id])
Expand Down
7 changes: 6 additions & 1 deletion src/domains/citizen-auth-app/08_session_manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ data "azurerm_key_vault_secret" "session_manager_IOLOGIN_TEST_USERS" {
key_vault_id = data.azurerm_key_vault.kv.id
}

data "azurerm_linux_function_app" "itn_auth_lv_func" {
name = "${local.short_project_itn}-lv-func-02"
resource_group_name = "${local.short_project_itn}-lv-rg-01"
}

###########

resource "azurerm_resource_group" "session_manager_rg_weu" {
Expand Down Expand Up @@ -137,7 +142,7 @@ locals {

# Functions Fast Login config
FAST_LOGIN_API_KEY = data.azurerm_key_vault_secret.functions_fast_login_api_key.value
FAST_LOGIN_API_URL = "https://${module.function_fast_login_itn.default_hostname}"
FAST_LOGIN_API_URL = "https://${data.azurerm_linux_function_app.itn_auth_lv_func.default_hostname}"

# Functions Lollipop config
LOLLIPOP_API_BASE_PATH = "/api/v1"
Expand Down
1 change: 1 addition & 0 deletions src/domains/citizen-auth-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
| [azurerm_key_vault_secret.session_manager_JWT_ZENDESK_SUPPORT_TOKEN_SECRET](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
| [azurerm_key_vault_secret.session_manager_TEST_LOGIN_PASSWORD](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
| [azurerm_key_vault_secret.session_manager_UNIQUE_EMAIL_ENFORCEMENT_USER](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
| [azurerm_linux_function_app.itn_auth_lv_func](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 |
Expand Down
6 changes: 3 additions & 3 deletions src/domains/citizen-auth-common/99_locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ locals {

fast_login_backend_url = "https://%s/api/v1"

# Fast Login references refers to src/domains/citizen-auth-app/07_functions_fast_login.tf
fn_fast_login_name = "${local.common_project_itn}-auth-lv-fn-01"
fn_fast_login_resource_group_name = "${local.common_project_itn}-fast-login-rg-01"
# Fast Login references refers to io-auth-n-identity-domain/infra/resources/prod/function_lv.tf
fn_fast_login_name = "${local.common_project_itn}-auth-lv-func-02"
fn_fast_login_resource_group_name = "${local.common_project_itn}-auth-lv-rg-01"
}

# Region ITN
Expand Down
2 changes: 1 addition & 1 deletion src/domains/ioweb-app/06_function_ioweb_profile.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ locals {
// Fast Login config
// -------------------------
FAST_LOGIN_API_KEY = data.azurerm_key_vault_secret.functions_fast_login_api_key.value
FAST_LOGIN_CLIENT_BASE_URL = "https://io-p-itn-auth-lv-fn-01.azurewebsites.net"
FAST_LOGIN_CLIENT_BASE_URL = "https://io-p-itn-auth-lv-func-02.azurewebsites.net"

// -------------------------
// Functions App config
Expand Down

0 comments on commit 1f90767

Please sign in to comment.