Skip to content

Commit 5cc6fc4

Browse files
authored
Merge branch 'master' into revert-to-managed-identity-cosmos
2 parents 0d9d225 + 3ab31d6 commit 5cc6fc4

File tree

22 files changed

+191
-179
lines changed

22 files changed

+191
-179
lines changed

infra/core/psn/hub/prod/appgw.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ resource "azurerm_application_gateway" "hub" {
4848
}
4949

5050
autoscale_configuration {
51-
min_capacity = 1
52-
max_capacity = 2
51+
min_capacity = 5
52+
max_capacity = 20
5353
}
5454

5555
gateway_ip_configuration {

infra/core/psn/spoke/prod/iam.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,15 @@ resource "azurerm_role_assignment" "itwallet_rg_terraform_blob_owner" {
44
principal_id = data.azuread_group.itwallet.object_id
55
description = "Allow the group to read and write Terraform state"
66
}
7+
8+
data "azurerm_user_assigned_identity" "infra_cd" {
9+
name = "iw-p-itn-infra-github-cd-id-01"
10+
resource_group_name = "iw-p-itn-github-identities-rg-01"
11+
}
12+
13+
resource "azurerm_role_assignment" "infra_cd_pep_subnet_network_contributor" {
14+
role_definition_name = "Network Contributor"
15+
scope = azurerm_subnet.pep.id
16+
principal_id = data.azurerm_user_assigned_identity.infra_cd.principal_id
17+
description = "Grant Network Contributor to infra CD pipeline on pep subnet"
18+
}

infra/resources/_modules/cdn/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ No modules.
2121
| Name | Type |
2222
|------|------|
2323
| [azurerm_cdn_endpoint.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint) | resource |
24-
| [azurerm_cdn_endpoint_custom_domain.cdn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint_custom_domain) | resource |
2524
| [azurerm_cdn_profile.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_profile) | resource |
2625
| [azurerm_monitor_diagnostic_setting.cdn_profile](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_diagnostic_setting) | resource |
2726
| [azurerm_monitor_metric_alert.storage_account_low_availability](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert) | resource |

infra/resources/_modules/function_apps/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ No requirements.
6060
| <a name="input_health_check_path_support"></a> [health\_check\_path\_support](#input\_health\_check\_path\_support) | Health check path for support function app | `string` | n/a | yes |
6161
| <a name="input_health_check_path_user"></a> [health\_check\_path\_user](#input\_health\_check\_path\_user) | Health check path for user function app | `string` | n/a | yes |
6262
| <a name="input_health_check_path_user_uat"></a> [health\_check\_path\_user\_uat](#input\_health\_check\_path\_user\_uat) | Health check path for user uat function app | `string` | n/a | yes |
63+
| <a name="input_is_psn"></a> [is\_psn](#input\_is\_psn) | Temporary variable to manage both IO and PSN resources | `bool` | `false` | no |
6364
| <a name="input_key_vault_id"></a> [key\_vault\_id](#input\_key\_vault\_id) | Id of the common Key Vault where save secrets in | `string` | n/a | yes |
6465
| <a name="input_key_vault_wallet_id"></a> [key\_vault\_wallet\_id](#input\_key\_vault\_wallet\_id) | Id of the wallet Key Vault where save secrets | `string` | n/a | yes |
6566
| <a name="input_key_vault_wallet_name"></a> [key\_vault\_wallet\_name](#input\_key\_vault\_wallet\_name) | Name of the wallet Key Vault where save secrets | `string` | n/a | yes |
@@ -78,6 +79,10 @@ No requirements.
7879
| <a name="input_virtual_network"></a> [virtual\_network](#input\_virtual\_network) | Virtual network to create subnet in | <pre>object({<br/> name = string<br/> resource_group_name = string<br/> })</pre> | n/a | yes |
7980
| <a name="input_wallet_instance_creation_email_queue_name"></a> [wallet\_instance\_creation\_email\_queue\_name](#input\_wallet\_instance\_creation\_email\_queue\_name) | Send Email on Wallet Instance Creation Queue Name | `string` | n/a | yes |
8081
| <a name="input_wallet_instance_revocation_email_queue_name"></a> [wallet\_instance\_revocation\_email\_queue\_name](#input\_wallet\_instance\_revocation\_email\_queue\_name) | Send Email on Wallet Instance Revocation Queue Name | `string` | n/a | yes |
82+
| <a name="input_wallet_instance_storage_account_name"></a> [wallet\_instance\_storage\_account\_name](#input\_wallet\_instance\_storage\_account\_name) | The name of the Wallet Instance Storage Account | `string` | n/a | yes |
83+
| <a name="input_wallet_instance_storage_account_uat_name"></a> [wallet\_instance\_storage\_account\_uat\_name](#input\_wallet\_instance\_storage\_account\_uat\_name) | The name of the Wallet Instance Storage Account UAT | `string` | n/a | yes |
84+
| <a name="input_wallet_instance_storage_account_uat_url"></a> [wallet\_instance\_storage\_account\_uat\_url](#input\_wallet\_instance\_storage\_account\_uat\_url) | The URL of the Wallet Instance Storage Account UAT | `string` | n/a | yes |
85+
| <a name="input_wallet_instance_storage_account_url"></a> [wallet\_instance\_storage\_account\_url](#input\_wallet\_instance\_storage\_account\_url) | The URL of the Wallet Instance Storage Account | `string` | n/a | yes |
8186

8287
## Outputs
8388

infra/resources/_modules/function_apps/locals.tf

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

infra/resources/_modules/storage_accounts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ No modules.
4040
| <a name="input_action_group_id"></a> [action\_group\_id](#input\_action\_group\_id) | Id of the alert action group | `string` | n/a | yes |
4141
| <a name="input_customer_managed_key_url"></a> [customer\_managed\_key\_url](#input\_customer\_managed\_key\_url) | URL of the customer managed key to encrypt the Storage Account | `string` | `null` | no |
4242
| <a name="input_environment"></a> [environment](#input\_environment) | n/a | <pre>object({<br/> prefix = string<br/> environment = string<br/> location = string<br/> name = string<br/> instance_number = string<br/> })</pre> | n/a | yes |
43+
| <a name="input_is_psn"></a> [is\_psn](#input\_is\_psn) | Temporary variable to manage both IO and PSN resources | `bool` | `false` | no |
4344
| <a name="input_key_vault_wallet_id"></a> [key\_vault\_wallet\_id](#input\_key\_vault\_wallet\_id) | Id of the wallet Key Vault where storage account saves secrets | `string` | `null` | no |
4445
| <a name="input_private_endpoint"></a> [private\_endpoint](#input\_private\_endpoint) | Configuration for the Private Endpoints | <pre>object({<br/> subnet_pep_id = string<br/> blob_private_dns_zone_id = string<br/> queue_private_dns_zone_id = string<br/> })</pre> | `null` | no |
4546
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | Name of the resource group where resources will be created | `string` | n/a | yes |

infra/resources/prod/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@
3838
|------|------|
3939
| [azurerm_api_management_api.wallet_user_ioapp_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource |
4040
| [azurerm_api_management_api.wallet_user_uat_ioapp_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource |
41+
| [azurerm_api_management_api_operation_policy.health_check_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
42+
| [azurerm_api_management_api_operation_policy.health_check_uat_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
4143
| [azurerm_api_management_api_policy.wallet_user_uat_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_policy) | resource |
4244
| [azurerm_api_management_api_policy.wallet_user_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_policy) | resource |
4345
| [azurerm_api_management_api_tag.wallet_user](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_tag) | resource |
4446
| [azurerm_api_management_api_tag.wallet_user_uat](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_tag) | resource |
4547
| [azurerm_api_management_api_version_set.wallet_user_ioapp](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
4648
| [azurerm_api_management_api_version_set.wallet_user_uat_ioapp](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
47-
| [azurerm_api_management_backend.psn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_backend) | resource |
48-
| [azurerm_api_management_policy_fragment.wallet_authentication](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_policy_fragment) | resource |
49+
| [azurerm_api_management_backend.wallet_user_psn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_backend) | resource |
50+
| [azurerm_api_management_backend.wallet_user_uat_psn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_backend) | resource |
4951
| [azurerm_api_management_product.wallet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product) | resource |
5052
| [azurerm_api_management_product_api.wallet_user_uat_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product_api) | resource |
5153
| [azurerm_api_management_product_api.wallet_user_v1](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product_api) | resource |

infra/resources/prod/apim_platform.tf

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ resource "azurerm_api_management_backend" "wallet_user_uat_psn" {
1616
url = "https://api.internal.wallet.io.pagopa.it/api/wallet/uat/v1/"
1717
}
1818

19-
resource "azurerm_api_management_policy_fragment" "wallet_authentication" {
20-
name = "io-wallet-app-session-fragment"
21-
description = "Handle authentication session for IO app"
22-
api_management_id = data.azurerm_api_management.platform_api_gateway.id
23-
format = "rawxml"
24-
value = file("${path.module}/fragments/io-wallet-app-session-fragment.xml")
19+
locals {
20+
wallet_authentication_fragment_name = "ioapp-authenticated"
2521
}
2622

2723
resource "azurerm_api_management_product" "wallet" {
@@ -131,7 +127,11 @@ resource "azurerm_api_management_api_policy" "wallet_user_v1" {
131127
xml_content = <<XML
132128
<policies>
133129
<inbound>
134-
<include-fragment fragment-id="${azurerm_api_management_policy_fragment.wallet_authentication.name}" />
130+
<choose>
131+
<when condition="@(!context.Variables.ContainsKey(&quot;skipSessionFragment&quot;))">
132+
<include-fragment fragment-id="${local.wallet_authentication_fragment_name}" />
133+
</when>
134+
</choose>
135135
<base />
136136
<set-backend-service backend-id="${azurerm_api_management_backend.wallet_user_psn.name}" />
137137
</inbound>
@@ -146,7 +146,11 @@ resource "azurerm_api_management_api_policy" "wallet_user_uat_v1" {
146146
xml_content = <<XML
147147
<policies>
148148
<inbound>
149-
<include-fragment fragment-id="${azurerm_api_management_policy_fragment.wallet_authentication.name}" />
149+
<choose>
150+
<when condition="@(!context.Variables.ContainsKey(&quot;skipSessionFragment&quot;))">
151+
<include-fragment fragment-id="${local.wallet_authentication_fragment_name}" />
152+
</when>
153+
</choose>
150154
<base />
151155
<set-backend-service backend-id="${azurerm_api_management_backend.wallet_user_uat_psn.name}" />
152156
</inbound>

infra/resources/prod/fragments/tfmodules.lock.json renamed to infra/resources/prod/apis/user_uat_v1/tfmodules.lock.json

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)