Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#IOPID-1987, IOPID-1989, IOPID-1988] LV Dependencies configuration #1212

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common/prod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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.functions_fast_login_snet](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_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 @@ -97,6 +97,12 @@ data "azurerm_subnet" "admin_snet" {
virtual_network_name = local.core.networking.weu.vnet_common.name
}

data "azurerm_subnet" "itn_auth_fast_login_func_snet" {
name = "${local.project_itn}-citizen-auth-fast-login-snet-01"
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" "functions_fast_login_snet" {
name = "${local.project_weu}-fast-login-snet"
resource_group_name = local.core.networking.weu.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.functions_fast_login_snet.id,
data.azurerm_subnet.itn_auth_fast_login_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
2 changes: 1 addition & 1 deletion src/domains/citizen-auth-app/08_session_manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,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 = var.fastlogin_enabled ? "https://${module.function_fast_login[0].default_hostname}" : ""
FAST_LOGIN_API_URL = var.fastlogin_enabled ? "https://${module.function_fast_login_itn.default_hostname}" : ""

# Functions Lollipop config
LOLLIPOP_API_BASE_PATH = "/api/v1"
Expand Down
6 changes: 3 additions & 3 deletions src/domains/citizen-auth-common/03_apim_v2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ data "azurerm_key_vault_secret" "functions_fast_login_api_key" {
key_vault_id = module.key_vault.id
}

resource "azurerm_api_management_named_value" "io_fn_weu_fast_login_operation_key_v2" {
name = "io-fn-weu-fast-login-operation-key"
resource "azurerm_api_management_named_value" "io_fn_itn_fast_login_operation_key_v2" {
name = "io-fn-itn-fast-login-operation-key"
api_management_name = data.azurerm_api_management.apim_v2_api.name
resource_group_name = data.azurerm_api_management.apim_v2_api.resource_group_name
display_name = "io-fn-weu-fast-login-operation-key"
display_name = "io-fn-itn-fast-login-operation-key"
value = data.azurerm_key_vault_secret.functions_fast_login_api_key.value
secret = "true"
}
Expand Down
4 changes: 2 additions & 2 deletions src/domains/citizen-auth-common/99_locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ 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.product}-weu-fast-login-fn"
fn_fast_login_resource_group_name = "${local.product}-weu-fast-login-rg"
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"
}

# Region ITN
Expand Down
2 changes: 1 addition & 1 deletion src/domains/citizen-auth-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
| [azurerm_api_management_group_user.pagopa_group_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_group_user) | resource |
| [azurerm_api_management_group_user.pagopa_operation_group_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_group_user) | resource |
| [azurerm_api_management_named_value.api_fast_login_operation_group_name](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
| [azurerm_api_management_named_value.io_fn_itn_fast_login_operation_key_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
| [azurerm_api_management_named_value.io_fn_itn_lollipop_key_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
| [azurerm_api_management_named_value.io_fn_itn_lollipop_url_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
| [azurerm_api_management_named_value.io_fn_weu_fast_login_operation_key_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
| [azurerm_api_management_subscription.pagopa_fastlogin_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
| [azurerm_api_management_subscription.pagopa_operation_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
| [azurerm_api_management_subscription.pagopa_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<inbound>
<base />
<set-header name="x-functions-key" exists-action="override">
<value>{{io-fn-weu-fast-login-operation-key}}</value>
<value>{{io-fn-itn-fast-login-operation-key}}</value>
</set-header>
<set-header name="x-user-id" exists-action="override">
<value>@(context.User.Id)</value>
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-weu-fast-login-fn.azurewebsites.net"
FAST_LOGIN_CLIENT_BASE_URL = "https://io-p-itn-auth-lv-fn-01.azurewebsites.net"

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