Skip to content

Commit

Permalink
Merge branch 'main' into CHK-3572-improve-send-payment-result-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
infantesimone authored Dec 20, 2024
2 parents 8405b8e + 856d8f1 commit f0b0c0d
Show file tree
Hide file tree
Showing 76 changed files with 1,130 additions and 566 deletions.
2 changes: 1 addition & 1 deletion src/aks-leonardo/env/itn-prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ aks_private_cluster_enabled = true
aks_alerts_enabled = false
aks_kubernetes_version = "1.29.4"
aks_sku_tier = "Standard"
aks_enable_workload_identity = false
aks_enable_workload_identity = true

aks_system_node_pool = {
name = "papaksleosys",
Expand Down
5 changes: 5 additions & 0 deletions src/domains/apiconfig-secret/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"postgresql-db-cfg-password": "ENC[AES256_GCM,data:ZAKVFY6XERg=,iv:ovzkeOYS7l3pywA7h5LVnMyZvjBZ+CH/sUPfh3H5ezw=,tag:ZLOrv0Yg60YOZ2OmshuXfw==,type:str]",
"github-token-read-packages": "ENC[AES256_GCM,data:IPWM+WHq+yPqZEvSuFKlu5KIFXlJ227dINJlVJnJsmc4ZnJvm+NprA==,iv:MmhusAdpBwA1b546YWTjfdkFDnYDdNErFkkibxZbs4g=,tag:4HX7+cQ5oDthoKdq4e832g==,type:str]",
"apiconfig-selfcare-integration-api-subscription-key": "ENC[AES256_GCM,data:ybxBOBSAhDqHpv6NqZM33Gv4A+W62HitWl+ili6K,iv:oHT2SWMtGNz/4kJm5pQhCiSV5fJzqhyYqSpzwOPcQeo=,tag:Ug1yIOKzY7YFwjpqC4eiRQ==,type:str]",
"pagopa-platform-domain-github-bot-cd-pat": "ENC[AES256_GCM,data:iuWbzFCdlZeEPw3Ywz8wTHcEmc57McVHwJKw2N0tINygy2IhNXl9GA==,iv:iVFcyrE/YAnNmMDOCUwcfHTWsW6tz59bOHgwXLnPaMY=,tag:CxN/PaZrsBGtT+5arKfyuw==,type:str]",
"pagopa-platform-domain-github-bot-ci-pat": "ENC[AES256_GCM,data:Or9BeSig4CvHtBRwXtJ4Wf3Ohvy5siqqVR4LHjxRU7FrHu/YhPJqeg==,iv:2B09Yit1DjcE4omQgOz1umAXkFRBWFzB4uErOwT/T/w=,tag:VCtfIx3c+zh9EfsyNIMf9A==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
Expand All @@ -26,8 +28,8 @@
],
"hc_vault": null,
"age": null,
"lastmodified": "2024-12-13T18:09:54Z",
"mac": "ENC[AES256_GCM,data:IMisntpNDVN1VXdn+0GFtQB6UrpGdk+XuJFiJjna86sGxepPZ+z1WJYpmFDuktRr2eDykUEJE2jvLifwyog8ZHgmyVthgOYRfODtWqofuhINgMItSuxYMOJSv/y2Lnbc+Wg9Y6w2suKh4KL7B2FgcddzIH4hDsz1aHnTV3yDDQU=,iv:3dKV6Q9SIc+ujXTsg4hEAfNyfRiz5hHAYnFAky6gHrU=,tag:hAVupFV0eoiyMKA5Jzef8w==,type:str]",
"lastmodified": "2024-12-18T09:33:35Z",
"mac": "ENC[AES256_GCM,data:bDQmP9is4ng3VuslXu1g+M/uOL7ErydV69ZfVKXkofP9It5PoQipXYTYUCT4Cq0FjpYhvJ4abc0RpdqOGmURrKueEOwOcifbTjo/QH0tCxCouVFeyjy8OLVsQcY07aHtsDaIiy1ZI75wsa7eUbKIJaHOcgAbwh2AMH1HeGEBY0w=,iv:nNjgvMEDR1xijMiMZaVe+pGNbahtfPgNFjtG9oDIJgw=,tag:kStY73xhirCt9G4sBc0/8g==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"api-config-cache-subscription-key": "ENC[AES256_GCM,data:PdaMqKZkXI6cEHgEv/JlOL0gIQ3n1bW6F/qM1f5aK9A=,iv:Iv0tOgyQbusKRbmwRUQ7McXffvSRMU/LgWLH2tqJzDo=,tag:9ezHul9PwzaMPq/rqXsa5g==,type:str]",
"cfg-for-node-subscription-key": "ENC[AES256_GCM,data:zhYdlR7rSCHBCChzEBup8Gl0eCrLGvwe3z57JUlyJtE=,iv:0VfS1SKtsJUfCc6GJAf/o3WHpfZeTTAKN2xeVqbD4lc=,tag:psVV4dgv64b13SNKh771Pg==,type:str]",
"encrypted-github-token-read-packages-bot": "ENC[AES256_GCM,data:frGd/A0N+GwzRra2B8ZACyHI9ZgER6tK+HzviWdHvhQyLV0FPGAuT6mAPkpJ7zOWM0y7PhWl1xupUlQWZ6AHUHWdddcIHrunBph7UouVdJtwwDZIoO1kcovlwAUrm5JdLfWWja/C/jPH48fgYHiz2dINWi1GEmUo,iv:4KLviO6m0LKslXgCX4FCbxbAp3sHao/AUqOO+rdZ+uA=,tag:0UYRfknVYgSMm1EqqeZlWg==,type:str]",
"pagopa-platform-domain-github-bot-pwd": "ENC[AES256_GCM,data:OlNIQjB8NphqcqAx1NfA,iv:vCRZxTPCbNxBPshDwNaZiMrq9qB/hTMehVWgaupyiRo=,tag:2rLngP9Pfy+8NaLs+ve8Ew==,type:str]",
"pagopa-platform-domain-github-bot-cd-pat": "ENC[AES256_GCM,data:LG2KIlI1zk8GRfnWFoOfWfcDP3RRLYn0lHYn2ZAyKRI6T02YS1VZjg==,iv:s/lPhR1bw3ShdVMIIc+YWMPSEc6fbG/qmMqh2yVk0mc=,tag:41qXlvvIeUD8RM9QZXQzfw==,type:str]",
"pagopa-platform-domain-github-bot-ci-pat": "ENC[AES256_GCM,data:xNqbtuP3I2rSWlE02UIiQSJOr6ZZBjun+F8hao1EqDpQWT4oqe8Ydw==,iv:uyo7yHbPcYPGo2pRBzkE/6PpPoI62B/9wCEg3zd+7Po=,tag:TB6s6i2Iej39SLfHz+gBDA==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
Expand All @@ -24,8 +27,8 @@
],
"hc_vault": null,
"age": null,
"lastmodified": "2024-12-17T06:11:09Z",
"mac": "ENC[AES256_GCM,data:xBKeb7ZIKpnCDo4rsqnjl5K26dsRY5540FoJtrfmWuiwNa8rnsR96QNWwSNAd6D7wj8oDWReuz9cbEna5HvMLfk/2X2qe30aIUe4fLNYbJ9BR3l4jC3nl7TlupJoM5oDLHhCBeKH51JNpwwK39EbzTuEwBiU6CLYRRZJ2GRRY/w=,iv:o7ZaZ+3oshjYY7cYVqt3YLRAo1wt6QtmdCWYOD1KnRs=,tag:YPNjZyC82rgn0llPMZdUiQ==,type:str]",
"lastmodified": "2024-12-18T09:51:10Z",
"mac": "ENC[AES256_GCM,data:r/gPdtMrjagp1Xt7tljAtjS3XQapDcOYHsiEMH6UeptojVBsETJH7F/w22AZVRqp2pFP7+1PST/y6lMxDJuFPVRSJennaja9MAzRc0tirBvCATRC1kQLEnri1fPPOm+MRgP7eI5lFXF2tXBKkrLOvG1BdkdupLXbsJ20l1NKUkM=,iv:vNrsyvmthGezAfZnqlpfQ0B718WDOYE8eZE6TPYeeG4=,tag:XvwXRmm3wN8+gR3HItH0XA==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"db-postgres-nexi-cfg-password": "ENC[AES256_GCM,data:66GhyeHkSxfx,iv:yxU757/syCjtky+YQeZAVLhNbwU9xHtAWc5SFByPNok=,tag:g2rqSfqi7ZaL4PfTpQ5Bow==,type:str]",
"db-postgres-nexi-cfg-password-prf": "ENC[AES256_GCM,data:JC++m/WdD6j+JTop,iv:GoR+clAyHBZAVYKYil3MXx0NrGtY4MBxjvtTnh8DkOQ=,tag:NrTC6cppu3NES35qCTtzqw==,type:str]",
"encrypted-github-token-read-packages-bot": "ENC[AES256_GCM,data:ZomCSbsAFnkqd8bPCF2Xcz4vOp7GQAE5wgCtyIhPg9WozhZDF5qFojT3/S2bk5NIHuyfCfvPfZ1L/4zwc+7FJl69Umbd8VeqGEcMXVDXNOHJbGHEbF7AzUSbG5s/8GhAMr+g9vTFfDCDKqEhjoWoxzxwU8yj6VzU,iv:We9TIfYzkkogZXMMHLD8AkAV85e/OlyZwQoQNo9f+BA=,tag:KGS4nAQWdoTsioPoZyucPw==,type:str]",
"pagopa-platform-domain-github-bot-cd-pat": "ENC[AES256_GCM,data:NBoSxbYYAeysi660OwL7e+q0HA1D0LJzRyFQqAlMrH3ElFD0iaDumw==,iv:rdJhpJQDzmc+tYlxCU1kX2CVkEsc5Fef8ydZFw+LSlw=,tag:rjqT9+Wnto4imFbCwXL8+Q==,type:str]",
"pagopa-platform-domain-github-bot-ci-pat": "ENC[AES256_GCM,data:H3TZq9MfYG4s0JehQARZ01NPeD32a39beiOt+36SgsTjMZOkvFTHmA==,iv:KXCqJ6YfjYAfvSdNgkT+LTDK1rqfDWiecGN6H03tLLo=,tag:c4aEPGPX3zTHcNlPBdFtSA==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
Expand All @@ -26,8 +28,8 @@
],
"hc_vault": null,
"age": null,
"lastmodified": "2024-12-16T13:29:28Z",
"mac": "ENC[AES256_GCM,data:tJnFf5K7k9XO3avUNQNApQ71DfpuUV462jnQpSbai6dxJTFYtrGHyHm4wjIXQPTllkbzs8Yz7uu+Qd5zj+ElYSO/Zj8eeK2Ynp8AobIn+evFKZA90/SaaaqUyvKhwulnS2/I/el/+4HJmTMbFrfXyWWTGMMe2pPzTrHTgktpom4=,iv:cOXv2ax5u0vtpqgz1zLuuYJq++Zq6nfpRt6JS65wrjA=,tag:kJ5cmRE9Wz/6DQtm0LOnxg==,type:str]",
"lastmodified": "2024-12-18T09:43:52Z",
"mac": "ENC[AES256_GCM,data:6+ixD+9mE3OEb1cNXirjXhcvaqUfDxlcWnN9mdaUGSjmZM2Bs60yChIJTVila/384tV9sSAlm8sXBUU9Svl4a7cNVfBd4G8b+5D5GMlov7pE7osr2z1i52B9Jm8h4GZsC0NU/DU8k3BLmiS/WCt+ugQnc6XhCNlfOo9oE7Co/qE=,iv:OzHgNRErwOzpporGUxNwZZU4i0KKvpl8Q/3SXQF/PF8=,tag:eJKkH+6arH4L1ZaeW7BIAw==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.1"
Expand Down
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 @@ -67,12 +67,17 @@
bool allUp = true;

foreach (var service in services) {
var parsedResponse = ((IResponse)context.Variables[service]).Body.As<JObject>();
var serviceResponse = context.Variables[service] as IResponse;
bool isServiceUp = serviceResponse.StatusCode == 200;
JObject parsedResponse = isServiceUp ? serviceResponse.Body.As<JObject>() : new JObject(new JProperty("status", "DOWN"));
combinedResults[service] = parsedResponse;
if ((string)parsedResponse["status"] != "UP") {
if (isServiceUp && (string)parsedResponse["status"] != "UP" || !isServiceUp) {
allUp = false;
}
}
}

var response = new JObject();
Expand Down
42 changes: 27 additions & 15 deletions src/domains/fdr-common/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 8 additions & 23 deletions src/domains/fdr-common/03_postgresql_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,20 @@ module "postgresql_fdr_replica_db" {
tags = var.tags
}

resource "null_resource" "virtual_endpoint" {
count = var.geo_replica_enabled ? 1 : 0
triggers = {
rg_name = azurerm_resource_group.db_rg.name
primary_server_name = module.postgres_flexible_server_fdr.name
ve_name = "${local.project}-pgflex-ve"
member_name = module.postgresql_fdr_replica_db[0].name
}

provisioner "local-exec" {
command = <<EOT
az postgres flexible-server virtual-endpoint create --resource-group ${self.triggers.rg_name} --server-name ${self.triggers.primary_server_name} --name ${self.triggers.ve_name} --endpoint-type ReadWrite --members ${self.triggers.member_name}
EOT
}

provisioner "local-exec" {
when = destroy
command = <<EOT
az postgres flexible-server virtual-endpoint delete --resource-group ${self.triggers.rg_name} --server-name ${self.triggers.primary_server_name} --name ${self.triggers.ve_name} --yes
EOT
}
resource "azurerm_postgresql_flexible_server_virtual_endpoint" "virtual_endpoint" {
count = var.geo_replica_enabled ? 1 : 0
name = "${local.project}-pgflex-ve"
source_server_id = module.postgres_flexible_server_fdr.id
replica_server_id = module.postgresql_fdr_replica_db[0].id
type = "ReadWrite"
}


resource "azurerm_private_dns_cname_record" "cname_record" {
depends_on = [null_resource.virtual_endpoint]
count = var.geo_replica_enabled && var.postgres_dns_registration_virtual_endpoint_enabled ? 1 : 0
name = "fdr-db"
zone_name = "${var.env_short}.internal.postgresql.pagopa.it"
resource_group_name = data.azurerm_resource_group.rg_vnet.name
ttl = 300
record = "${null_resource.virtual_endpoint[0].triggers.ve_name}.writer.postgres.database.azure.com"
record = "${azurerm_postgresql_flexible_server_virtual_endpoint.virtual_endpoint[0].name}.writer.postgres.database.azure.com"
}
2 changes: 1 addition & 1 deletion src/domains/fdr-common/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
azurerm = {
source = "hashicorp/azurerm"
version = "<= 3.107.0"
version = ">= 3.116.0, < 4.0.0"
}
azuread = {
source = "hashicorp/azuread"
Expand Down
Loading

0 comments on commit f0b0c0d

Please sign in to comment.