Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: [PAGOPA-2479] - GPD v3 api #2681

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/domains/gps-app/04_apim_gpd.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
########################################################
# Aggregated product for APIs of the following microservice
# - GPD-core: module.apim_api_debt_positions_api_v1
# - GPD-core: module.apim_api_debt_positions_api_v3
# - GPD-Payments: module.apim_api_gpd_payments_rest_external_api_v1
# - GPD-Reporting-Analysis: module.apim_api_gpd_reporting_analysis_api
# - GPD-Upload: module.apim_gpd_upload_api_v1
Expand Down
33 changes: 30 additions & 3 deletions src/domains/gps-app/04_apim_gpd_core.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module "apim_api_debt_positions_api_v1" {
service = module.apim_debt_positions_product.product_id
})

xml_content = file("./api/gpd_api/debt-position-services/v1/_base_policy.xml")
xml_content = file("./api/gpd_api/debt-position-services/_base_policy.xml")
}

module "apim_api_debt_positions_api_v2" {
Expand All @@ -154,7 +154,7 @@ module "apim_api_debt_positions_api_v2" {
name = format("%s-debt-positions-service-api", local.product)
api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg
product_ids = [module.apim_debt_positions_product.product_id, module.apim_aca_integration_product.product_id, module.apim_gpd_integration_product.product_id]
product_ids = [module.apim_debt_positions_product.product_id, module.apim_gpd_integration_product.product_id]
subscription_required = local.apim_debt_positions_service_api.subscription_required
version_set_id = azurerm_api_management_api_version_set.api_debt_positions_api.id
api_version = "v2"
Expand All @@ -170,10 +170,37 @@ module "apim_api_debt_positions_api_v2" {
host = local.apim_hostname
service = module.apim_debt_positions_product.product_id
})

// warning: ad-hoc base policy because there is a rewrite URI
xml_content = file("./api/gpd_api/debt-position-services/v2/_base_policy.xml")
}

module "apim_api_debt_positions_api_v3" {
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-debt-positions-service-api", local.product)
api_management_name = local.pagopa_apim_name
resource_group_name = local.pagopa_apim_rg
product_ids = [module.apim_debt_positions_product.product_id, module.apim_gpd_integration_product.product_id]

subscription_required = local.apim_debt_positions_service_api.subscription_required
version_set_id = azurerm_api_management_api_version_set.api_debt_positions_api.id
api_version = "v3"

description = local.apim_debt_positions_service_api.description
display_name = local.apim_debt_positions_service_api.display_name
path = local.apim_debt_positions_service_api.path
protocols = ["https"]
service_url = local.apim_debt_positions_service_api.service_url

content_format = "openapi"
content_value = templatefile("./api/gpd_api/debt-position-services/v3/_openapi.json.tpl", {
host = local.apim_hostname
service = module.apim_debt_positions_product.product_id
})

xml_content = file("./api/gpd_api/debt-position-services/_base_policy.xml")
}

#########################################
## GPD CREATE DEBT POSITION POLICIES ####
#########################################
Expand Down
3 changes: 1 addition & 2 deletions src/domains/gps-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
| <a name="module_apim_aca_integration_product"></a> [apim\_aca\_integration\_product](#module\_apim\_aca\_integration\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_apim_api_debt_positions_api_v1"></a> [apim\_api\_debt\_positions\_api\_v1](#module\_apim\_api\_debt\_positions\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_debt_positions_api_v2"></a> [apim\_api\_debt\_positions\_api\_v2](#module\_apim\_api\_debt\_positions\_api\_v2) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_debt_positions_api_v3"></a> [apim\_api\_debt\_positions\_api\_v3](#module\_apim\_api\_debt\_positions\_api\_v3) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gpd_api"></a> [apim\_api\_gpd\_api](#module\_apim\_api\_gpd\_api) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gpd_api_v2"></a> [apim\_api\_gpd\_api\_v2](#module\_apim\_api\_gpd\_api\_v2) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gpd_enrollment_api_v1"></a> [apim\_api\_gpd\_enrollment\_api\_v1](#module\_apim\_api\_gpd\_enrollment\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gpd_payments_rest_external_api_v1"></a> [apim\_api\_gpd\_payments\_rest\_external\_api\_v1](#module\_apim\_api\_gpd\_payments\_rest\_external\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gpd_reporting_analysis_api"></a> [apim\_api\_gpd\_reporting\_analysis\_api](#module\_apim\_api\_gpd\_reporting\_analysis\_api) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gps_api_v1"></a> [apim\_api\_gps\_api\_v1](#module\_apim\_api\_gps\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gps_donation_api_v1"></a> [apim\_api\_gps\_donation\_api\_v1](#module\_apim\_api\_gps\_donation\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_gps_enrollments_api_v1"></a> [apim\_api\_gps\_enrollments\_api\_v1](#module\_apim\_api\_gps\_enrollments\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_api_pn_integration_gpd_api_v1"></a> [apim\_api\_pn\_integration\_gpd\_api\_v1](#module\_apim\_api\_pn\_integration\_gpd\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
Expand Down Expand Up @@ -74,7 +74,6 @@
| [azurerm_api_management_api_version_set.api_gpd_payments_rest_external_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_gpd_payments_soap_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_gpd_reporting_analysis_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_gps_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_gps_donation_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_gps_enrollments_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
| [azurerm_api_management_api_version_set.api_pn_integration_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
Expand Down
Loading
Loading