From d9a202667b02e8f2c79b2e41e3fa5a15991149c7 Mon Sep 17 00:00:00 2001 From: Simone infante <52280205+infantesimone@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:47:27 +0100 Subject: [PATCH 01/11] chore: bye bye PM alerts :-) delete pm alerting (#2688) * chore: delete pm alerting * chore: update readme --- src/core/README.md | 13 +-- src/core/payment_manager_monitor.tf | 154 ---------------------------- 2 files changed, 4 insertions(+), 163 deletions(-) delete mode 100644 src/core/payment_manager_monitor.tf diff --git a/src/core/README.md b/src/core/README.md index ce1b40f1b9..29fa1c1ed5 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -245,14 +245,9 @@ | [azurerm_key_vault_certificate.buyerbanks_cert](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/key_vault_certificate) | resource | | [azurerm_monitor_autoscale_setting.buyerbanks_function](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_autoscale_setting) | resource | | [azurerm_monitor_scheduled_query_rules_alert.buyerbanks_update_alert](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_scheduled_query_rules_alert) | resource | -| [azurerm_monitor_scheduled_query_rules_alert.pm_payment_gateway_availability](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_scheduled_query_rules_alert) | resource | -| [azurerm_monitor_scheduled_query_rules_alert.pm_restapi_availability](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_scheduled_query_rules_alert) | resource | -| [azurerm_monitor_scheduled_query_rules_alert.pm_restapi_cd_availability](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_scheduled_query_rules_alert) | resource | -| [azurerm_monitor_scheduled_query_rules_alert.pm_wallet_availability](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/monitor_scheduled_query_rules_alert) | resource | | [azurerm_private_dns_zone.privatelink_postgres_database_azure_com](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/private_dns_zone) | resource | | [azurerm_private_dns_zone_virtual_network_link.privatelink_postgres_database_azure_com_vnet](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/private_dns_zone_virtual_network_link) | resource | | [azurerm_resource_group.buyerbanks_rg](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/resource_group) | resource | -| [azurerm_resource_group.payment_manager_monitor_rg](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/resource_group) | resource | | [azurerm_storage_container.banks](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/storage_container) | resource | | [azurerm_storage_management_policy.buyerbanks_storage_lifeclycle_policies](https://registry.terraform.io/providers/hashicorp/azurerm/2.99.0/docs/resources/storage_management_policy) | resource | | [null_resource.decoupler_configuration_from_json_2_xml](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | @@ -322,7 +317,7 @@ | [apim\_logger\_resource\_id](#input\_apim\_logger\_resource\_id) | Resource id for the APIM logger | `string` | `null` | no | | [apim\_nodo\_auth\_decoupler\_enable](#input\_apim\_nodo\_auth\_decoupler\_enable) | Apply decoupler to nodo-auth product apim policy | `bool` | `false` | no | | [apim\_nodo\_decoupler\_enable](#input\_apim\_nodo\_decoupler\_enable) | Apply decoupler to nodo product apim policy | `bool` | `false` | no | -| [app\_gateway\_allowed\_paths\_pagopa\_onprem\_only](#input\_app\_gateway\_allowed\_paths\_pagopa\_onprem\_only) | Allowed paths from pagopa onprem only |
object({| n/a | yes | +| [app\_gateway\_allowed\_paths\_pagopa\_onprem\_only](#input\_app\_gateway\_allowed\_paths\_pagopa\_onprem\_only) | Allowed paths from pagopa onprem only |
paths = list(string)
ips = list(string)
})
object({| n/a | yes | | [bpd\_hostname](#input\_bpd\_hostname) | BPD hostname | `string` | `""` | no | | [buyer\_banks\_storage\_account\_replication\_type](#input\_buyer\_banks\_storage\_account\_replication\_type) | (Optional) Buyer banks storage account replication type | `string` | `"LRS"` | no | | [buyerbanks\_advanced\_threat\_protection](#input\_buyerbanks\_advanced\_threat\_protection) | Enable contract threat advanced protection | `bool` | `false` | no | @@ -345,12 +340,12 @@ | [dns\_zone\_prefix](#input\_dns\_zone\_prefix) | The dns subdomain. | `string` | `null` | no | | [dns\_zone\_prefix\_prf](#input\_dns\_zone\_prefix\_prf) | The dns subdomain. | `string` | `""` | no | | [ecommerce\_ingress\_hostname](#input\_ecommerce\_ingress\_hostname) | ecommerce ingress hostname | `string` | `null` | no | -| [enabled\_features](#input\_enabled\_features) | Features enabled in this domain |
paths = list(string)
ips = list(string)
})
object({|
vnet_ita = bool
node_forwarder_ha = optional(bool, false)
})
{| no | +| [enabled\_features](#input\_enabled\_features) | Features enabled in this domain |
"vnet_ita": false
}
object({|
vnet_ita = bool
node_forwarder_ha = optional(bool, false)
})
{| no | | [env](#input\_env) | Contains env description in extend format (dev,uat,prod) | `string` | n/a | yes | | [env\_short](#input\_env\_short) | Environment shot version | `string` | n/a | yes | | [external\_domain](#input\_external\_domain) | Domain for delegation | `string` | `null` | no | | [fesp\_hostname](#input\_fesp\_hostname) | Fesp hostname | `string` | `""` | no | -| [function\_app\_storage\_account\_info](#input\_function\_app\_storage\_account\_info) | n/a |
"vnet_ita": false
}
object({|
account_kind = optional(string, "StorageV2")
account_tier = optional(string, "Standard")
account_replication_type = optional(string, "LRS")
access_tier = optional(string, "Hot")
advanced_threat_protection_enable = optional(bool, true)
})
{| no | +| [function\_app\_storage\_account\_info](#input\_function\_app\_storage\_account\_info) | n/a |
"access_tier": "Hot",
"account_kind": "StorageV2",
"account_replication_type": "LRS",
"account_tier": "Standard",
"advanced_threat_protection_enable": true
}
object({|
account_kind = optional(string, "StorageV2")
account_tier = optional(string, "Standard")
account_replication_type = optional(string, "LRS")
access_tier = optional(string, "Hot")
advanced_threat_protection_enable = optional(bool, true)
})
{| no | | [io\_bpd\_hostname](#input\_io\_bpd\_hostname) | IO BPD hostname | `string` | `""` | no | | [location](#input\_location) | Main location | `string` | `"westeurope"` | no | | [location\_ita](#input\_location\_ita) | Main location | `string` | `"italynorth"` | no | @@ -364,7 +359,7 @@ | [postgres\_private\_endpoint\_enabled](#input\_postgres\_private\_endpoint\_enabled) | Private endpoint database enable? | `bool` | `false` | no | | [prefix](#input\_prefix) | n/a | `string` | `"pagopa"` | no | | [satispay\_hostname](#input\_satispay\_hostname) | Satispay hostname | `string` | `""` | no | -| [tags](#input\_tags) | n/a | `map(any)` |
"access_tier": "Hot",
"account_kind": "StorageV2",
"account_replication_type": "LRS",
"account_tier": "Standard",
"advanced_threat_protection_enable": true
}
{| no | +| [tags](#input\_tags) | n/a | `map(any)` |
"CreatedBy": "Terraform"
}
{| no | | [xpay\_hostname](#input\_xpay\_hostname) | Nexi xpay hostname | `string` | `""` | no | ## Outputs diff --git a/src/core/payment_manager_monitor.tf b/src/core/payment_manager_monitor.tf deleted file mode 100644 index 5383e0a53a..0000000000 --- a/src/core/payment_manager_monitor.tf +++ /dev/null @@ -1,154 +0,0 @@ -resource "azurerm_resource_group" "payment_manager_monitor_rg" { - count = var.env_short == "p" ? 1 : 0 - name = format("%s-payment-manager-monitor-rg", local.project) - location = var.location - tags = var.tags -} - -# Availability: Payment Manager - pp-restapi - only for checkout -resource "azurerm_monitor_scheduled_query_rules_alert" "pm_restapi_availability" { - count = var.env_short == "p" ? 1 : 0 - name = "${local.project}-pm-restapi-availability-alert" - resource_group_name = azurerm_resource_group.payment_manager_monitor_rg[0].name - location = var.location - - action { - action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, data.azurerm_monitor_action_group.mo_email.id, data.azurerm_monitor_action_group.pm_opsgenie[0].id] - email_subject = "Email Header" - custom_webhook_payload = "{}" - } - data_source_id = data.azurerm_application_gateway.app_gw.id - description = "Availability pm-restapi (for pagopa - checkout) greater than or equal 99%" - enabled = true - query = (<<-QUERY -AzureDiagnostics -| where ResourceType == 'APPLICATIONGATEWAYS' - and OperationName == 'ApplicationGatewayAccess' - and requestUri_s startswith "/payment-manager/pp-restapi/" -| summarize - Total=count(), - Success=count((toint(httpStatus_d) >= 200 and toint(httpStatus_d) < 500 and timeTaken_d < 2)) - by Time=bin(TimeGenerated, 15m) -| extend Availability=((Success * 1.0) / Total) * 100 -| where toint(Availability) < 99 - QUERY - ) - severity = 1 - frequency = 30 - time_window = 30 - trigger { - operator = "GreaterThanOrEqual" - threshold = 2 - } -} - -# Availability: Payment Manager - pp-restapi-CD -resource "azurerm_monitor_scheduled_query_rules_alert" "pm_restapi_cd_availability" { - count = var.env_short == "p" ? 1 : 0 - name = "${local.project}-pm-restapi-cd-availability-alert" - resource_group_name = azurerm_resource_group.payment_manager_monitor_rg[0].name - location = var.location - - action { - action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, data.azurerm_monitor_action_group.mo_email.id, data.azurerm_monitor_action_group.pm_opsgenie[0].id] - email_subject = "Email Header" - custom_webhook_payload = "{}" - } - data_source_id = data.azurerm_application_gateway.app_gw.id - description = "Availability pm-restapi-cd greater than or equal 99%" - enabled = true - query = (<<-QUERY -AzureDiagnostics -| where ResourceType == 'APPLICATIONGATEWAYS' - and OperationName == 'ApplicationGatewayAccess' - and requestUri_s startswith '/pp-restapi-CD' -| summarize - Total=count(), - Success=count((toint(httpStatus_d) >= 200 and toint(httpStatus_d) < 500 and timeTaken_d < 2)) - by Time=bin(TimeGenerated, 15m) -| extend Availability=((Success * 1.0) / Total) * 100 -| where toint(Availability) < 90 - QUERY - ) - severity = 1 - frequency = 30 - time_window = 30 - trigger { - operator = "GreaterThanOrEqual" - threshold = 2 - } -} - - -# Availability: Payment Manager - pp-wallet -resource "azurerm_monitor_scheduled_query_rules_alert" "pm_wallet_availability" { - count = var.env_short == "p" ? 1 : 0 - name = "${local.project}-pm-restapi-wallet-availability-alert" - resource_group_name = azurerm_resource_group.payment_manager_monitor_rg[0].name - location = var.location - - action { - action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, data.azurerm_monitor_action_group.mo_email.id, data.azurerm_monitor_action_group.pm_opsgenie[0].id] - email_subject = "Email Header" - custom_webhook_payload = "{}" - } - data_source_id = data.azurerm_application_gateway.app_gw.id - description = "Availability pm-wallet greater than or equal 99%" - enabled = true - query = (<<-QUERY -AzureDiagnostics -| where ResourceType == "APPLICATIONGATEWAYS" - and OperationName == "ApplicationGatewayAccess" - and requestUri_s startswith "/wallet" -| summarize - Total=count(), - Success=count((toint(httpStatus_d) >= 200 and toint(httpStatus_d) < 500 and timeTaken_d < 3)) - by Time=bin(TimeGenerated, 15m) -| extend Availability=((Success * 1.0) / Total) * 100 -| where toint(Availability) < 99 - QUERY - ) - severity = 1 - frequency = 30 - time_window = 30 - trigger { - operator = "GreaterThanOrEqual" - threshold = 2 - } -} - -# Availability: Payment Manager - payment-gateway -resource "azurerm_monitor_scheduled_query_rules_alert" "pm_payment_gateway_availability" { - count = var.env_short == "p" ? 1 : 0 - name = "${local.project}-pm-payment-gateway-availability-alert" - resource_group_name = azurerm_resource_group.payment_manager_monitor_rg[0].name - location = var.location - - action { - action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id] - email_subject = "Email Header" - custom_webhook_payload = "{}" - } - data_source_id = data.azurerm_application_insights.application_insights.id - description = "Availability pm-payment-gateway greater than or equal 99%" - enabled = true - query = (<<-QUERY -requests -| where url startswith 'https://api.platform.pagopa.it/payment-manager/payment-gateway/' -| summarize - Total=count(), - Success=count(toint(resultCode) >= 200 and toint(resultCode) < 500) - by Time=bin(timestamp, 15m) -| extend Availability=((Success * 1.0) / Total) * 100 -| extend Watermark=99 -| where toint(Availability) < 99 - QUERY - ) - severity = 1 - frequency = 30 - time_window = 30 - trigger { - operator = "GreaterThanOrEqual" - threshold = 2 - } -} From ff82265ed6bcb5faa127c7d55f0f19bb9a3e7920 Mon Sep 17 00:00:00 2001 From: Simone infante <52280205+infantesimone@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:02:22 +0100 Subject: [PATCH 02/11] feat(frd-kpi): PPABV-98 add authorizer check for fdr kpi (#2675) * feat(frd-kpi): add authorizer check for fdr kpi * feat: add new psps id as query param * chore: check for brokerId * chore: brokerFiscalCode as query param * fix: update broker as query param * fix: typo * chore: check brokerFiscalCode as first --- .../qi-fdr-kpi-api/v1/_base_policy.xml.tpl | 20 ++++++++ .../api/qi-fdr-kpi-api/v1/_openapi.json.tpl | 50 +++++++------------ 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/domains/qi-app/api/qi-fdr-kpi-api/v1/_base_policy.xml.tpl b/src/domains/qi-app/api/qi-fdr-kpi-api/v1/_base_policy.xml.tpl index 0706e600dc..b9fbd5fafa 100644 --- a/src/domains/qi-app/api/qi-fdr-kpi-api/v1/_base_policy.xml.tpl +++ b/src/domains/qi-app/api/qi-fdr-kpi-api/v1/_base_policy.xml.tpl @@ -1,6 +1,26 @@
"CreatedBy": "Terraform"
}
object({| n/a | yes | | [enabled\_resource](#input\_enabled\_resource) | Feature flags |
fiscal_code = string
notice_number = string
})
object({| n/a | yes | | [env](#input\_env) | n/a | `string` | n/a | yes | | [env\_short](#input\_env\_short) | n/a | `string` | n/a | yes | @@ -49,8 +54,10 @@ | [prefix](#input\_prefix) | n/a | `string` | n/a | yes | | [self\_alert\_enabled](#input\_self\_alert\_enabled) | (Optional) enables the alert on the function itself | `bool` | `true` | no | | [storage\_account\_replication\_type](#input\_storage\_account\_replication\_type) | (Required) table storage replication type | `string` | n/a | yes | +| [synthetic\_alerts\_enabled](#input\_synthetic\_alerts\_enabled) | (Optional) Enables alerts generated by the synthetic monitoring probe | `bool` | `false` | no | | [tags](#input\_tags) | n/a | `map(any)` |
container_app_tools_cae = optional(bool, false),
})
{| no | | [use\_private\_endpoint](#input\_use\_private\_endpoint) | (Required) if true enables the usage of private endpoint | `bool` | n/a | yes | +| [verify\_payment\_internal\_expected\_outcome](#input\_verify\_payment\_internal\_expected\_outcome) | (Required) Expected outcome for verify payment notice internal | `string` | n/a | yes | ## Outputs diff --git a/src/synthetic-monitoring/env/weu-dev/terraform.tfvars b/src/synthetic-monitoring/env/weu-dev/terraform.tfvars index 0f50d4a773..58f63a14f0 100644 --- a/src/synthetic-monitoring/env/weu-dev/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-dev/terraform.tfvars @@ -30,3 +30,12 @@ law_daily_quota_gb = 10 self_alert_enabled = false force = "v1" + +# +# monitoring template variables +# +check_position_body = { + fiscal_code = "66666666666" + notice_number = "310115803416020234" +} +verify_payment_internal_expected_outcome = "KO" diff --git a/src/synthetic-monitoring/env/weu-prod/terraform.tfvars b/src/synthetic-monitoring/env/weu-prod/terraform.tfvars index 96792b02af..438e57f768 100644 --- a/src/synthetic-monitoring/env/weu-prod/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-prod/terraform.tfvars @@ -21,8 +21,19 @@ tags = { enabled_resource = { container_app_tools_cae = true } - +synthetic_alerts_enabled = true law_sku = "CapacityReservation" # TODO verify why it is changed from PerGB2018 to CapacityReservation law_retention_in_days = 30 law_daily_quota_gb = -1 + +# +# monitoring template variables +# +check_position_body = { + fiscal_code = "00876220633" + notice_number = "001000000136265862" +} +verify_payment_internal_expected_outcome = "OK" + + diff --git a/src/synthetic-monitoring/env/weu-uat/terraform.tfvars b/src/synthetic-monitoring/env/weu-uat/terraform.tfvars index c5fa75b086..283d8731e5 100644 --- a/src/synthetic-monitoring/env/weu-uat/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-uat/terraform.tfvars @@ -26,3 +26,12 @@ enabled_resource = { law_sku = "PerGB2018" law_retention_in_days = 30 law_daily_quota_gb = 10 + +# +# monitoring template variables +# +check_position_body = { + fiscal_code = "15376371009" + notice_number = "351173232582781477" +} +verify_payment_internal_expected_outcome = "KO" diff --git a/src/synthetic-monitoring/monitoring_configuration.json b/src/synthetic-monitoring/monitoring_configuration.json deleted file mode 100644 index 5b7f5fb916..0000000000 --- a/src/synthetic-monitoring/monitoring_configuration.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "apiName" : "root", - "appName" : "root", - "url" : "https://api.dev.platform.pagopa.it/", - "type" : "public", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa dev context root" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "status", - "appName" : "fdr-org", - "url" : "https://api.dev.platform.pagopa.it/fdr-org/service/v1/info", - "type" : "public", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "headers": { - "Ocp-Apim-Subscription-Key": "b9461d7ae36746309752298df93934da" - }, - "tags" : { - "description" : "pagopa fdr status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "request-flow", - "appName" : "fdr", - "url" : "https://api.dev.platform.pagopa.it/fdr-psp/service/v1/psps/60000000001/fdrs/2024-02-0860000000001-17074057078", - "type" : "public", - "checkCertificate" : true, - "method" : "POST", - "expectedCodes" : ["200", "400"], - "body": { - "fdr": "2024-02-0860000000001-17074057078", - "fdrDate": "2024-02-08T15:21:47.834Z", - "sender": { - "type": "LEGAL_PERSON", - "id": "SELBIT2B", - "pspId": "60000000001", - "pspName": "Bank", - "pspBrokerId": "60000000001", - "channelId": "15376371009_04" - ,"password": "PLACEHOLDER" - }, - "receiver": { - "id": "APPBIT2B", - "organizationId": "15376371009", - "organizationName": "Comune di xyz" - }, - "regulation": "SEPA - Bonifico xzy", - "regulationDate": "2024-02-08T15:21:47.834Z", - "bicCodePouringBank": "UNCRITMMXXX", - "totPayments": 3, - "sumPayments": 0.03 - }, - "headers": { - "Ocp-Apim-Subscription-Key": "e879a6b70e2241898d0b8b5b9d647df0" - }, - "tags" : { - "description" : "pagopa fdr uat status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - } -] diff --git a/src/synthetic-monitoring/monitoring_configuration.json.tpl b/src/synthetic-monitoring/monitoring_configuration.json.tpl index 40a8dfa991..2654461720 100644 --- a/src/synthetic-monitoring/monitoring_configuration.json.tpl +++ b/src/synthetic-monitoring/monitoring_configuration.json.tpl @@ -3,7 +3,7 @@ "apiName" : "root", "appName" : "pagopa", "url" : "https://${api_dot_env_name}.platform.pagopa.it/", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -12,14 +12,33 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} + } + }, + { + "apiName" : "root", + "appName" : "pagopa", + "url" : "https://${appgw_public_ip}/", + "type" : "appgw", + "checkCertificate" : true, + "method" : "GET", + "expectedCodes" : ["200"], + "headers": { + "Host": "${api_dot_env_name}.platform.pagopa.it" + }, + "tags" : { + "description" : "pagopa ${env_name} context root" + }, + "durationLimit" : 10000, + "alertConfiguration" : { + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmcalculator", + "appName" : "afmCalculator", "url" : "https://${internal_api_domain_prefix}.afm.${internal_api_domain_suffix}/pagopa-afm-calculator-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -28,14 +47,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmcalculator", + "appName" : "afmCalculator", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=afmcalculator", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -44,15 +63,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmmarketplace", + "appName" : "afmMarketplace", "url" : "https://${internal_api_domain_prefix}.afm.${internal_api_domain_suffix}/pagopa-afm-marketplace-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -61,14 +80,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmmarketplace", + "appName" : "afmMarketplace", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=afmmarketplace", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -77,15 +96,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmutils", + "appName" : "afmUtils", "url" : "https://${internal_api_domain_prefix}.afm.${internal_api_domain_suffix}/pagopa-afm-utils-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -94,14 +113,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "afmutils", + "appName" : "afmUtils", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=afmutils", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -110,15 +129,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "apiconfig", + "appName" : "apiConfig", "url" : "https://${internal_api_domain_prefix}.apiconfig.${internal_api_domain_suffix}/pagopa-api-config-core-service/o/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -127,14 +146,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "apiconfig", + "appName" : "apiConfig", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=apiconfig", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -143,15 +162,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "authorizer", + "appName" : "authorizerConfig", "url" : "https://${internal_api_domain_prefix}.shared.${internal_api_domain_suffix}/authorizer-config/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -160,14 +179,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "authorizer", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=authorizer", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -176,15 +195,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, - - { + { "apiName" : "status", "appName" : "bizevents", "url" : "https://${internal_api_domain_prefix}.bizevents.${internal_api_domain_suffix}/pagopa-biz-events-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -193,14 +211,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "bizevents", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=bizevents", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -209,15 +227,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "bizevents-neg", + "appName" : "bizeventsNeg", "url" : "https://${internal_api_domain_prefix}.bizevents.${internal_api_domain_suffix}/pagopa-negative-biz-events-datastore-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -226,14 +244,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "bizevents-neg", + "appName" : "bizeventsNeg", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=bizeventsdatastoreneg", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -242,15 +260,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "bizevents-ds", + "appName" : "bizeventsDs", "url" : "https://${internal_api_domain_prefix}.bizevents.${internal_api_domain_suffix}/pagopa-biz-events-datastore-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -259,14 +277,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "bizevents-ds", + "appName" : "bizeventsDs", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=bizeventsdatastorepos", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -275,7 +293,7 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, @@ -283,7 +301,7 @@ "apiName" : "status", "appName" : "selfcare", "url" : "https://${internal_api_domain_prefix}.selfcare.${internal_api_domain_suffix}/selfcare/pagopa/v1/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -292,7 +310,7 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, @@ -300,7 +318,7 @@ "apiName" : "status", "appName" : "fdr", "url" : "https://${internal_api_domain_prefix}.fdr.${internal_api_domain_suffix}/pagopa-fdr-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -309,14 +327,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "fdr", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=fdrndpnew", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -325,7 +343,7 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, @@ -333,7 +351,7 @@ "apiName" : "status", "appName" : "gpd", "url" : "https://${internal_api_domain_prefix}.gps.${internal_api_domain_suffix}/pagopa-gpd-core/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -342,14 +360,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "gpd", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpd", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -358,15 +376,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "gpd-payments", + "appName" : "gpdPayments", "url" : "https://${internal_api_domain_prefix}.gps.${internal_api_domain_suffix}/pagopa-gpd-payments/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -375,14 +393,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "gpd-payments", + "appName" : "gpdPayments", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdpayments", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -391,14 +409,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "gpd-payments-pull", + "appName" : "gpdPaymentsPull", "url" : "https://${internal_api_domain_prefix}.gps.${internal_api_domain_suffix}/pagopa-gpd-payments-pull/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -407,14 +425,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "gpd-enrollment", + "appName" : "gpdEnrollment", "url" : "https://${internal_api_domain_prefix}.gps.${internal_api_domain_suffix}/pagopa-gpd-reporting-orgs-enrollment/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -423,14 +441,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "gpd-enrollment", + "appName" : "gpdEnrollment", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdenrollment", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -439,7 +457,7 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, @@ -447,7 +465,7 @@ "apiName" : "status", "appName" : "gps", "url" : "https://${internal_api_domain_prefix}.gps.${internal_api_domain_suffix}/pagopa-spontaneous-payments-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -456,14 +474,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "gps", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gps", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -472,15 +490,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-datastore", + "appName" : "receiptsDatastore", "url" : "https://${internal_api_domain_prefix}.receipts.${internal_api_domain_suffix}/pagopa-receipt-pdf-datastore/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -489,14 +507,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-datastore", + "appName" : "receiptsDatastore", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=receiptpdfdatastore", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -505,15 +523,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-generator", + "appName" : "receiptsGenerator", "url" : "https://${internal_api_domain_prefix}.receipts.${internal_api_domain_suffix}/pagopa-receipt-pdf-generator/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -522,14 +540,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-generator", + "appName" : "receiptsGenerator", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=receiptpdfgenerator", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -538,15 +556,15 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-notifier", + "appName" : "receiptsNotifier", "url" : "https://${internal_api_domain_prefix}.receipts.${internal_api_domain_suffix}/pagopa-receipt-pdf-notifier/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -555,14 +573,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", - "appName" : "receipts-notifier", + "appName" : "receiptsNotifier", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=receiptpdfnotifier", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -571,7 +589,7 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, @@ -579,7 +597,7 @@ "apiName" : "status", "appName" : "receipts", "url" : "https://${internal_api_domain_prefix}.receipts.${internal_api_domain_suffix}/pagopa-receipt-pdf-service/info", - "type" : "private", + "type" : "aks", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -588,14 +606,14 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { "apiName" : "status", "appName" : "receipts", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=receiptpdfservice", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -604,97 +622,20 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, - { - "apiName" : "status", - "appName" : "authorizer", - "url" : "https://pagopa-${env_short}-weu-shared-authorizer-fn.azurewebsites.net/info", - "type" : "private", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa ${env_name} authorizer status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "status", - "appName" : "authorizer", - "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=authorizer", - "type" : "public", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa ${env_name} authorizer status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "status", - "appName" : "canoneunico", - "url" : "https://pagopa-${env_short}-fn-canoneunico.azurewebsites.net/info", - "type" : "private", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa ${env_name} canoneunico status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "status", - "appName" : "canoneunico", - "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=canoneunico", - "type" : "public", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa ${env_name} canoneunico status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, + + + { "apiName" : "status", - "appName" : "gpd-analysis", - "url" : "https://pagopa-${env_short}-weu-fn-gpd-analysis.azurewebsites.net/info", - "type" : "private", - "checkCertificate" : true, - "method" : "GET", - "expectedCodes" : ["200"], - "tags" : { - "description" : "pagopa ${env_name} gpd-analysis status endpoint" - }, - "durationLimit" : 10000, - "alertConfiguration" : { - "enabled" : false - } - }, - { - "apiName" : "status", - "appName" : "gpd-analysis", + "appName" : "gpdAnalysis", "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdreportinganalysis", - "type" : "public", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -703,15 +644,16 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, + { "apiName" : "status", - "appName" : "gpd-batch", - "url" : "https://pagopa-${env_short}-weu-fn-gpd-batch.azurewebsites.net/api/info", - "type" : "private", + "appName" : "gpdBatch", + "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdreportingbatch", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], @@ -720,132 +662,184 @@ }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, + + { "apiName" : "status", - "appName" : "gpd-batch", - "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdreportingbatch", - "type" : "public", + "appName" : "gpdReporting", + "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdreportingservice", + "type" : "apim", "checkCertificate" : true, "method" : "GET", "expectedCodes" : ["200"], "tags" : { - "description" : "pagopa ${env_name} gpd-batch status endpoint" + "description" : "pagopa ${env_name} gpd-reporting status endpoint" }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, + + + + { - "apiName" : "status", - "appName" : "gpd-reporting", - "url" : "https://pagopa-${env_short}-weu-fn-gpd-service.azurewebsites.net/api/info", - "type" : "private", + "apiName" : "checkPosition", + "appName" : "nodo", + "url" : "https://${api_dot_env_name}.platform.pagopa.it/nodo/nodo-per-pm/v1/checkPosition", + "type" : "apim", "checkCertificate" : true, - "method" : "GET", + "method" : "POST", "expectedCodes" : ["200"], + "body": {"positionslist": [{"fiscalCode": "${check_position_body.fiscal_code}", "noticeNumber": "${check_position_body.notice_number}"}]}, + "expectedBody": {"outcome":"OK"}, + "bodyCompareStrategy": "contains", + "headers": { + "Content-Type": "application/json" + }, "tags" : { - "description" : "pagopa ${env_name} gpd-reporting status endpoint" + "description" : "pagopa nodo ${env_name} check position" }, "durationLimit" : 10000, "alertConfiguration" : { - "enabled" : false + "enabled" : ${alert_enabled} } }, { - "apiName" : "status", - "appName" : "gpd-reporting", - "url" : "https://${api_dot_env_name}.platform.pagopa.it/shared/statuspage/v1/info?product=gpdreportingservice", - "type" : "public", + "apiName" : "verifyPaymentNoticeExternal", + "appName" : "nodo", + "url" : "https://${api_dot_env_name}.platform.pagopa.it/nodo-auth/node-for-psp/v1", + "type" : "apim", "checkCertificate" : true, - "method" : "GET", + "method" : "POST", "expectedCodes" : ["200"], + "expectedBody": { + "soapenv:Envelope": { + "soapenv:Body": { + "nfp:verifyPaymentNoticeRes": { + "outcome": "KO" + } + } + } + }, + "bodyCompareStrategy": "xmlContains", + "body": "
"CreatedBy": "Terraform"
}
object({| n/a | yes | -| [pagopa\_vpn\_dr](#input\_pagopa\_vpn\_dr) | pagoPA on prem VPN DR |
ips = list(string)
})
object({| n/a | yes | +| [pagopa\_vpn](#input\_pagopa\_vpn) | pagoPA on prem VPN |
ips = list(string)
})
object({| n/a | yes | +| [pagopa\_vpn\_dr](#input\_pagopa\_vpn\_dr) | pagoPA on prem VPN DR |
ips = list(string)
})
object({| n/a | yes | | [pdv\_api\_base\_path](#input\_pdv\_api\_base\_path) | Personal data vault api base path | `string` | `null` | no | -| [pod\_disruption\_budgets](#input\_pod\_disruption\_budgets) | Pod disruption budget for domain namespace |
ips = list(string)
})
map(object({| `{}` | no | +| [pod\_disruption\_budgets](#input\_pod\_disruption\_budgets) | Pod disruption budget for domain namespace |
name = optional(string, null)
minAvailable = optional(number, null)
matchLabels = optional(map(any), {})
}))
map(object({| `{}` | no | | [prefix](#input\_prefix) | n/a | `string` | n/a | yes | -| [tags](#input\_tags) | n/a | `map(any)` |
name = optional(string, null)
minAvailable = optional(number, null)
matchLabels = optional(map(any), {})
}))
{| no | -| [tls\_cert\_check\_helm](#input\_tls\_cert\_check\_helm) | tls cert helm chart configuration |
"CreatedBy": "Terraform"
}
object({| n/a | yes | +| [tags](#input\_tags) | n/a | `map(any)` |
chart_version = string,
image_name = string,
image_tag = string
})
{| no | +| [tls\_cert\_check\_helm](#input\_tls\_cert\_check\_helm) | tls cert helm chart configuration |
"CreatedBy": "Terraform"
}
object({| n/a | yes | ## Outputs diff --git a/src/domains/ecommerce-common/README.md b/src/domains/ecommerce-common/README.md index 2f2e98d435..badaaf8f69 100644 --- a/src/domains/ecommerce-common/README.md +++ b/src/domains/ecommerce-common/README.md @@ -158,13 +158,13 @@ | [cidr\_subnet\_cosmosdb\_ecommerce](#input\_cidr\_subnet\_cosmosdb\_ecommerce) | Cosmos DB address space for ecommerce. | `list(string)` | n/a | yes | | [cidr\_subnet\_redis\_ecommerce](#input\_cidr\_subnet\_redis\_ecommerce) | Redis DB address space for ecommerce. | `list(string)` | n/a | yes | | [cidr\_subnet\_storage\_ecommerce](#input\_cidr\_subnet\_storage\_ecommerce) | Azure storage DB address space for ecommerce. | `list(string)` | n/a | yes | -| [cosmos\_mongo\_db\_ecommerce\_history\_params](#input\_cosmos\_mongo\_db\_ecommerce\_history\_params) | n/a |
chart_version = string,
image_name = string,
image_tag = string
})
object({| n/a | yes | -| [cosmos\_mongo\_db\_ecommerce\_params](#input\_cosmos\_mongo\_db\_ecommerce\_params) | n/a |
enable_serverless = bool
enable_autoscaling = bool
throughput = number
max_throughput = number
})
object({| n/a | yes | -| [cosmos\_mongo\_db\_params](#input\_cosmos\_mongo\_db\_params) | n/a |
enable_serverless = bool
enable_autoscaling = bool
throughput = number
max_throughput = number
})
object({| n/a | yes | +| [cosmos\_mongo\_db\_ecommerce\_history\_params](#input\_cosmos\_mongo\_db\_ecommerce\_history\_params) | n/a |
enabled = bool
capabilities = list(string)
offer_type = string
server_version = string
kind = string
consistency_policy = object({
consistency_level = string
max_interval_in_seconds = number
max_staleness_prefix = number
})
enable_free_tier = bool
main_geo_location_zone_redundant = bool
additional_geo_locations = list(object({
location = string
failover_priority = number
zone_redundant = bool
}))
private_endpoint_enabled = bool
public_network_access_enabled = bool
is_virtual_network_filter_enabled = bool
backup_continuous_enabled = bool
enable_provisioned_throughput_exceeded_alert = bool
})
object({| n/a | yes | +| [cosmos\_mongo\_db\_ecommerce\_params](#input\_cosmos\_mongo\_db\_ecommerce\_params) | n/a |
enable_serverless = bool
enable_autoscaling = bool
throughput = number
max_throughput = number
})
object({| n/a | yes | +| [cosmos\_mongo\_db\_params](#input\_cosmos\_mongo\_db\_params) | n/a |
enable_serverless = bool
enable_autoscaling = bool
throughput = number
max_throughput = number
})
object({| n/a | yes | | [dns\_zone\_internal\_prefix](#input\_dns\_zone\_internal\_prefix) | The dns subdomain. | `string` | `null` | no | | [domain](#input\_domain) | n/a | `string` | n/a | yes | -| [ecommerce\_storage\_deadletter\_params](#input\_ecommerce\_storage\_deadletter\_params) | Azure storage DB params for ecommerce deadletter resources. |
enabled = bool
capabilities = list(string)
offer_type = string
server_version = string
kind = string
consistency_policy = object({
consistency_level = string
max_interval_in_seconds = number
max_staleness_prefix = number
})
enable_free_tier = bool
main_geo_location_zone_redundant = bool
additional_geo_locations = list(object({
location = string
failover_priority = number
zone_redundant = bool
}))
private_endpoint_enabled = bool
public_network_access_enabled = bool
is_virtual_network_filter_enabled = bool
backup_continuous_enabled = bool
enable_provisioned_throughput_exceeded_alert = bool
})
object({|
enabled = bool,
kind = string,
tier = string,
account_replication_type = string,
advanced_threat_protection = bool,
retention_days = number,
public_network_access_enabled = bool,
})
{| no | -| [ecommerce\_storage\_transient\_params](#input\_ecommerce\_storage\_transient\_params) | Azure storage DB params for ecommerce transient resources. |
"account_replication_type": "LRS",
"advanced_threat_protection": true,
"enabled": false,
"kind": "StorageV2",
"public_network_access_enabled": false,
"retention_days": 7,
"tier": "Standard"
}
object({|
enabled = bool,
kind = string,
tier = string,
account_replication_type = string,
advanced_threat_protection = bool,
retention_days = number,
public_network_access_enabled = bool,
})
{| no | +| [ecommerce\_storage\_deadletter\_params](#input\_ecommerce\_storage\_deadletter\_params) | Azure storage DB params for ecommerce deadletter resources. |
"account_replication_type": "LRS",
"advanced_threat_protection": true,
"enabled": false,
"kind": "StorageV2",
"public_network_access_enabled": false,
"retention_days": 7,
"tier": "Standard"
}
object({|
enabled = bool,
kind = string,
tier = string,
account_replication_type = string,
advanced_threat_protection = bool,
retention_days = number,
public_network_access_enabled = bool,
})
{| no | +| [ecommerce\_storage\_transient\_params](#input\_ecommerce\_storage\_transient\_params) | Azure storage DB params for ecommerce transient resources. |
"account_replication_type": "LRS",
"advanced_threat_protection": true,
"enabled": false,
"kind": "StorageV2",
"public_network_access_enabled": false,
"retention_days": 7,
"tier": "Standard"
}
object({|
enabled = bool,
kind = string,
tier = string,
account_replication_type = string,
advanced_threat_protection = bool,
retention_days = number,
public_network_access_enabled = bool,
})
{| no | | [enable\_iac\_pipeline](#input\_enable\_iac\_pipeline) | If true create the key vault policy to allow used by azure devops iac pipelines. | `bool` | `false` | no | | [env](#input\_env) | n/a | `string` | n/a | yes | | [env\_short](#input\_env\_short) | n/a | `string` | n/a | yes | @@ -177,8 +177,8 @@ | [log\_analytics\_workspace\_resource\_group\_name](#input\_log\_analytics\_workspace\_resource\_group\_name) | The name of the resource group in which the Log Analytics workspace is located in. | `string` | n/a | yes | | [monitor\_resource\_group\_name](#input\_monitor\_resource\_group\_name) | Monitor resource group name | `string` | n/a | yes | | [prefix](#input\_prefix) | n/a | `string` | n/a | yes | -| [redis\_ecommerce\_params](#input\_redis\_ecommerce\_params) | n/a |
"account_replication_type": "LRS",
"advanced_threat_protection": true,
"enabled": false,
"kind": "StorageV2",
"public_network_access_enabled": false,
"retention_days": 7,
"tier": "Standard"
}
object({| n/a | yes | -| [tags](#input\_tags) | n/a | `map(any)` |
capacity = number
sku_name = string
family = string
version = string
ha_enabled = bool
zones = list(number)
})
{| no | +| [redis\_ecommerce\_params](#input\_redis\_ecommerce\_params) | n/a |
"CreatedBy": "Terraform"
}
object({| n/a | yes | +| [tags](#input\_tags) | n/a | `map(any)` |
capacity = number
sku_name = string
family = string
version = string
ha_enabled = bool
zones = list(number)
})
{| no | ## Outputs diff --git a/src/domains/qi-common/02_security.tf b/src/domains/qi-common/02_security.tf index 39c5dbd39b..b4d8050b2b 100644 --- a/src/domains/qi-common/02_security.tf +++ b/src/domains/qi-common/02_security.tf @@ -198,3 +198,16 @@ resource "azurerm_key_vault_secret" "azure_data_explorer_re_application_key" { ] } } + +### TODO migrate in SOPS +resource "azurerm_key_vault_secret" "elastic_otel_token_header" { + name = "elastic-otel-token-header" + value = "
"CreatedBy": "Terraform"
}
[| no | | [route\_table\_peering\_sia\_additional\_routes](#input\_route\_table\_peering\_sia\_additional\_routes) | (Optional) additional routes for route table peering sia |
"1"
]
list(object({| `[]` | no | +| [route\_tools](#input\_route\_tools) | AKS routing table |
address_prefix = string
name = string
next_hop_in_ip_address = string
next_hop_type = string
}
))
list(object({| n/a | yes | | [schema\_ip\_nexi](#input\_schema\_ip\_nexi) | Nodo Pagamenti Nexi schema://ip | `string` | n/a | yes | | [storage\_queue\_private\_endpoint\_enabled](#input\_storage\_queue\_private\_endpoint\_enabled) | Whether private endpoint for Azure Storage Queues is enabled | `bool` | `true` | no | | [tags](#input\_tags) | n/a | `map(any)` |
name = string
address_prefix = string
next_hop_type = string
next_hop_in_ip_address = string
}))
{| no | diff --git a/src/next-core/env/dev/terraform.tfvars b/src/next-core/env/dev/terraform.tfvars index 5ec39f48b8..aae225e02e 100644 --- a/src/next-core/env/dev/terraform.tfvars +++ b/src/next-core/env/dev/terraform.tfvars @@ -750,3 +750,12 @@ apicfg_selfcare_integ_service_path_value = "pagopa-api-config-selfcare-integrati law_sku = "PerGB2018" law_retention_in_days = 30 law_daily_quota_gb = 10 +route_tools = [ + { + # dev aks nodo oncloud + name = "tools-outbound-to-nexy-nodo" + address_prefix = "10.70.66.200/32" + next_hop_type = "VirtualAppliance" + next_hop_in_ip_address = "10.230.8.150" + } +] diff --git a/src/next-core/env/prod/terraform.tfvars b/src/next-core/env/prod/terraform.tfvars index 430db73191..ca2f9d1e58 100644 --- a/src/next-core/env/prod/terraform.tfvars +++ b/src/next-core/env/prod/terraform.tfvars @@ -854,3 +854,12 @@ monitor_env_test_urls = [ ] enable_node_forwarder_debug_instance = false +route_tools = [ + { + # dev aks nodo oncloud + name = "tools-outbound-to-nexy-nodo" + address_prefix = "10.79.20.34/32" + next_hop_type = "VirtualAppliance" + next_hop_in_ip_address = "10.230.10.150" + } +] diff --git a/src/next-core/env/uat/terraform.tfvars b/src/next-core/env/uat/terraform.tfvars index cf2bff8b4f..898bbb60a3 100644 --- a/src/next-core/env/uat/terraform.tfvars +++ b/src/next-core/env/uat/terraform.tfvars @@ -801,3 +801,14 @@ app_gateway_allowed_paths_upload = [ "/fdr-legacy/nodo-per-pa/.*", "/fdr-psp/.*" # Added temporarily as workaround for bug https://pagopa.atlassian.net/browse/PAGOPA-2263 ] + + +route_tools = [ + { + # dev aks nodo oncloud + name = "tools-outbound-to-nexy-nodo" + address_prefix = "10.70.74.200/32" + next_hop_type = "VirtualAppliance" + next_hop_in_ip_address = "10.230.9.150" + } +] diff --git a/src/synthetic-monitoring/02_monitoring.tf b/src/synthetic-monitoring/02_monitoring.tf index ce26d3125a..347f4f4c2a 100644 --- a/src/synthetic-monitoring/02_monitoring.tf +++ b/src/synthetic-monitoring/02_monitoring.tf @@ -45,5 +45,6 @@ module "monitoring_function" { check_position_body = var.check_position_body alert_enabled = var.synthetic_alerts_enabled verify_payment_internal_expected_outcome = var.verify_payment_internal_expected_outcome + nexi_node_ip = var.nexi_node_ip }) } diff --git a/src/synthetic-monitoring/99_variables.tf b/src/synthetic-monitoring/99_variables.tf index 5657e7cf84..ca617aca1c 100644 --- a/src/synthetic-monitoring/99_variables.tf +++ b/src/synthetic-monitoring/99_variables.tf @@ -113,3 +113,8 @@ variable "verify_payment_internal_expected_outcome" { type = string description = "(Required) Expected outcome for verify payment notice internal" } + +variable "nexi_node_ip" { + type = string + description = "Nodo Pagamenti Nexi ip" +} diff --git a/src/synthetic-monitoring/README.md b/src/synthetic-monitoring/README.md index b5c7e55b84..51d153d11e 100644 --- a/src/synthetic-monitoring/README.md +++ b/src/synthetic-monitoring/README.md @@ -51,6 +51,7 @@ | [law\_sku](#input\_law\_sku) | Sku of the Log Analytics Workspace | `string` | `"PerGB2018"` | no | | [location](#input\_location) | One of westeurope, northeurope | `string` | n/a | yes | | [location\_short](#input\_location\_short) | One of wue, neu | `string` | n/a | yes | +| [nexi\_node\_ip](#input\_nexi\_node\_ip) | Nodo Pagamenti Nexi ip | `string` | n/a | yes | | [prefix](#input\_prefix) | n/a | `string` | n/a | yes | | [self\_alert\_enabled](#input\_self\_alert\_enabled) | (Optional) enables the alert on the function itself | `bool` | `true` | no | | [storage\_account\_replication\_type](#input\_storage\_account\_replication\_type) | (Required) table storage replication type | `string` | n/a | yes | diff --git a/src/synthetic-monitoring/env/weu-dev/terraform.tfvars b/src/synthetic-monitoring/env/weu-dev/terraform.tfvars index 58f63a14f0..0a281018dd 100644 --- a/src/synthetic-monitoring/env/weu-dev/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-dev/terraform.tfvars @@ -39,3 +39,4 @@ check_position_body = { notice_number = "310115803416020234" } verify_payment_internal_expected_outcome = "KO" +nexi_node_ip = "10.70.66.200" diff --git a/src/synthetic-monitoring/env/weu-prod/terraform.tfvars b/src/synthetic-monitoring/env/weu-prod/terraform.tfvars index 438e57f768..0d854b3e54 100644 --- a/src/synthetic-monitoring/env/weu-prod/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-prod/terraform.tfvars @@ -35,5 +35,5 @@ check_position_body = { notice_number = "001000000136265862" } verify_payment_internal_expected_outcome = "OK" - +nexi_node_ip = "10.79.20.34" diff --git a/src/synthetic-monitoring/env/weu-uat/terraform.tfvars b/src/synthetic-monitoring/env/weu-uat/terraform.tfvars index 283d8731e5..ad29c361f9 100644 --- a/src/synthetic-monitoring/env/weu-uat/terraform.tfvars +++ b/src/synthetic-monitoring/env/weu-uat/terraform.tfvars @@ -35,3 +35,5 @@ check_position_body = { notice_number = "351173232582781477" } verify_payment_internal_expected_outcome = "KO" +nexi_node_ip = "10.70.74.200" + diff --git a/src/synthetic-monitoring/monitoring_configuration.json.tpl b/src/synthetic-monitoring/monitoring_configuration.json.tpl index 2654461720..36e8bee9d5 100644 --- a/src/synthetic-monitoring/monitoring_configuration.json.tpl +++ b/src/synthetic-monitoring/monitoring_configuration.json.tpl @@ -710,6 +710,30 @@ "enabled" : ${alert_enabled} } }, + { + "apiName" : "checkPosition", + "appName" : "nodo", + "url" : "https://${nexi_node_ip}/checkPosition", + "type" : "nexi", + "checkCertificate" : true, + "method" : "POST", + "expectedCodes" : ["200"], + "body": {"positionslist": [{"fiscalCode": "${check_position_body.fiscal_code}", "noticeNumber": "${check_position_body.notice_number}"}]}, + "expectedBody": {"outcome":"OK"}, + "bodyCompareStrategy": "contains", + "headers": { + "Content-Type": "application/json", + "ndphost": "nodo-${env_short}.nexigroup.com", + "Host": "nodo-dei-pagamenti.npc.sia.eu" + }, + "tags" : { + "description" : "pagopa nodo ${env_name} check position" + }, + "durationLimit" : 10000, + "alertConfiguration" : { + "enabled" : ${alert_enabled} + } + }, { "apiName" : "verifyPaymentNoticeExternal", "appName" : "nodo", @@ -774,9 +798,8 @@ "enabled" : ${alert_enabled} } }, - { - "apiName" : "verifyPaymentNoticeExternal", + "apiName" : "verifyPaymentNoticeInternal", "appName" : "nodo", "url" : "https://${appgw_public_ip}/nodo-auth/node-for-psp/v1", "type" : "appgw", @@ -787,13 +810,13 @@ "soapenv:Envelope": { "soapenv:Body": { "nfp:verifyPaymentNoticeRes": { - "outcome": "KO" + "outcome": "${verify_payment_internal_expected_outcome}" } } } }, "bodyCompareStrategy": "xmlContains", - "body": "
"CreatedBy": "Terraform"
}