Skip to content

Commit

Permalink
feat(healthcheck-statuspage): PPABV-60 add new product to support nod…
Browse files Browse the repository at this point in the history
…o,wallet and eCommerce healtcheck (#2678)

* feat: add new product to support nodo,wallet and eCommerce healtcheck

* chore: precommit refactoring
  • Loading branch information
infantesimone authored Dec 18, 2024
1 parent 73f8772 commit 11a1d56
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/domains/ecommerce-app/04_apim_ecommerce_healthcheck.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module "apim_ecommerce_healthcheck_api_v1" {
name = "${local.project}-healtcheck-api"
api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg
product_ids = ["statuspage_nodo_pagamenti"]
product_ids = ["pagoPAPlatformStatusPage"]
subscription_required = local.apim_ecommerce_healthcheck_service_api.subscription_required
version_set_id = azurerm_api_management_api_version_set.ecommerce_healthcheck_api.id
api_version = "v1"
Expand Down
2 changes: 1 addition & 1 deletion src/domains/ecommerce-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
| [azurerm_api_management_api.apim_ecommerce_npg_mock](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource |
| [azurerm_api_management_api.apim_ecommerce_npg_notifications](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource |
| [azurerm_api_management_api.apim_ecommerce_pdv_mock](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource |
| [azurerm_api_management_api_V2_operation_policy.get_transaction_info_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_V2_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.auth_request_gateway_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.confirm_payment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.create_session](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
Expand All @@ -77,6 +76,7 @@
| [azurerm_api_management_api_operation_policy.get_payment_request_info_api_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.get_state](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.get_transaction_info](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.get_transaction_info_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.get_transactions_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.helpdesk_pgs_vpos](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
| [azurerm_api_management_api_operation_policy.helpdesk_pgs_xpay](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module "apim_pay_wallet_healthcheck_api_v1" {
name = "${local.project}-healtcheck-api"
api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg
product_ids = ["statuspage_nodo_pagamenti"]
product_ids = ["pagoPAPlatformStatusPage"]
subscription_required = local.apim_payment_wallet_healthcheck_service_api.subscription_required
version_set_id = azurerm_api_management_api_version_set.pay_wallet_healthcheck_api.id
api_version = "v1"
Expand Down
10 changes: 5 additions & 5 deletions src/domains/pay-wallet-common/03_storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ locals {
action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.payment_wallet_opsgenie[0].id]
},
{
queue_key = "logged-action-dead-letter-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
queue_key = "logged-action-dead-letter-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.payment_wallet_opsgenie[0].id]
},
] : []
Expand Down
21 changes: 21 additions & 0 deletions src/domains/shared-app/04_apim_pagopa_platform_statuspage.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
##############
## Products ##
##############

module "apim_pagopa_platform_statuspage_product" {
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "pagoPAPlatformStatusPage"
display_name = "pagoPA platform Status Page"
description = "Prodotto pagoPA platform Status Page"

api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg

published = true
subscription_required = true
approval_required = true
subscriptions_limit = 1000

policy_xml = file("./api_product/_pagopa_platform_statuspage_policy.xml")
}
2 changes: 1 addition & 1 deletion src/domains/shared-app/04_apim_statuspage_ndp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module "apim_api_statuspage_nodopagamenti_api_v1" {
name = format("%s-statuspage-nodopagamenti-api", local.project)
api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg
product_ids = [module.apim_statuspage_nodo_pagamenti.product_id]
product_ids = [module.apim_statuspage_nodo_pagamenti.product_id, "pagoPAPlatformStatusPage"]
subscription_required = local.apim_statuspage_nodopagamenti_service_api.subscription_required
version_set_id = azurerm_api_management_api_version_set.api_statuspage_nodopagamenti_api.id
api_version = "v1"
Expand Down
1 change: 1 addition & 0 deletions src/domains/shared-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| <a name="module_apim_authorizer_product"></a> [apim\_authorizer\_product](#module\_apim\_authorizer\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_enrolled_orgs_product"></a> [apim\_enrolled\_orgs\_product](#module\_apim\_enrolled\_orgs\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_influxdb_product"></a> [apim\_influxdb\_product](#module\_apim\_influxdb\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_pagopa_platform_statuspage_product"></a> [apim\_pagopa\_platform\_statuspage\_product](#module\_apim\_pagopa\_platform\_statuspage\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_pdf_engine_product"></a> [apim\_pdf\_engine\_product](#module\_apim\_pdf\_engine\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_poc_product"></a> [apim\_poc\_product](#module\_apim\_poc\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_session_wallet_api_v1"></a> [apim\_session\_wallet\_api\_v1](#module\_apim\_session\_wallet\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<policies>
<inbound>
<base />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>

0 comments on commit 11a1d56

Please sign in to comment.