Skip to content

Commit

Permalink
feat: Paymcloud 172 ecommerce app (#2578)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamari90 authored Nov 21, 2024
1 parent fc30db6 commit 2bed043
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 121 deletions.
2 changes: 2 additions & 0 deletions src/domains/checkout-app/05_checkout_function.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ module "checkout_function" {

allowed_subnets = [data.azurerm_subnet.apim_snet.id]

ip_restriction_default_action = "Deny"

allowed_ips = []

tags = var.tags
Expand Down
74 changes: 37 additions & 37 deletions src/domains/ecommerce-app/.terraform.lock.hcl

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

2 changes: 1 addition & 1 deletion src/domains/ecommerce-app/02_namespace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "kubernetes_namespace" "namespace" {
}
}
module "pod_identity" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_pod_identity?ref=v6.6.0"
source = "./.terraform/modules/__v3__/kubernetes_pod_identity"

resource_group_name = local.aks_resource_group_name
location = var.location
Expand Down
34 changes: 17 additions & 17 deletions src/domains/ecommerce-app/04_apim_ecommerce.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "azurerm_api_management_group" "ecommerce-methods-full-read" {
##############

module "apim_ecommerce_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce"
display_name = "ecommerce pagoPA"
Expand All @@ -32,7 +32,7 @@ module "apim_ecommerce_product" {
}

module "apim_ecommerce_payment_methods_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-payment-methods"
display_name = "ecommerce pagoPA payment methods"
Expand All @@ -50,7 +50,7 @@ module "apim_ecommerce_payment_methods_product" {
}

module "apim_ecommerce_helpdesk_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-helpdesk"
display_name = "ecommerce pagoPA helpdesk service"
Expand Down Expand Up @@ -90,7 +90,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_transactions_servic
}

module "apim_ecommerce_transactions_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-transactions-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand All @@ -117,7 +117,7 @@ module "apim_ecommerce_transactions_service_api_v1" {
}

module "apim_ecommerce_transactions_service_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-transactions-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -166,7 +166,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_transaction_auth_re
}

module "apim_ecommerce_transaction_auth_requests_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-transaction-auth-requests-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -224,7 +224,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_transaction_user_re
}

module "apim_ecommerce_transaction_user_receipts_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-transaction-user-receipts-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -273,7 +273,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_payment_requests_se
}

module "apim_ecommerce_payment_requests_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-payment-requests-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -324,7 +324,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_payment_methods_ser


module "apim_ecommerce_payment_methods_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-payment-methods-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand All @@ -351,7 +351,7 @@ module "apim_ecommerce_payment_methods_service_api_v1" {
}

module "apim_ecommerce_payment_methods_service_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-payment-methods-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -400,7 +400,7 @@ resource "azurerm_api_management_api_version_set" "pagopa_notifications_service_
}

module "apim_pagopa_notifications_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-notifications-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -451,7 +451,7 @@ resource "azurerm_api_management_api_version_set" "pagopa_ecommerce_helpdesk_ser

#helpdesk api for ecommerce
module "apim_pagopa_ecommerce_helpdesk_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-helpdesk-service-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -479,7 +479,7 @@ module "apim_pagopa_ecommerce_helpdesk_service_api_v1" {

#helpdesk api V2 for ecommerce
module "apim_pagopa_ecommerce_helpdesk_service_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-helpdesk-service-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -556,7 +556,7 @@ data "azurerm_api_management_product" "technical_support_api_product" {

# technical helpdesk api for ecommerce
module "apim_pagopa_ecommerce_technical_helpdesk_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-technical-helpdesk-service-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -584,7 +584,7 @@ module "apim_pagopa_ecommerce_technical_helpdesk_service_api_v1" {


module "apim_pagopa_ecommerce_technical_helpdesk_service_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-technical-helpdesk-service-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -633,7 +633,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_user_stats_service_
}

module "apim_ecommerce_user_stats_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-user-stats-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand All @@ -657,4 +657,4 @@ module "apim_ecommerce_user_stats_service_api_v1" {
xml_content = templatefile("./api/ecommerce-user-stats-service/v1/_base_policy.xml.tpl", {
hostname = local.ecommerce_hostname
})
}
}
6 changes: 3 additions & 3 deletions src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_ecommerce_checkout_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-checkout"
display_name = "Ecommerce for checkout pagoPA"
Expand Down Expand Up @@ -40,7 +40,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_checkout_api_v1" {
}

module "apim_ecommerce_checkout_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-checkout-api"
resource_group_name = local.pagopa_apim_rg
Expand Down Expand Up @@ -179,7 +179,7 @@ resource "azurerm_api_management_api_operation_policy" "get_method_testing" {
# pagopa-ecommerce APIs for checkout V2

module "apim_ecommerce_checkout_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-checkout-api"
resource_group_name = local.pagopa_apim_rg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_ecommerce_helpdesk_commands_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-helpdesk-commands"
display_name = "ecommerce pagoPA helpdesk commands service"
Expand Down Expand Up @@ -45,7 +45,7 @@ resource "azurerm_api_management_api_version_set" "pagopa_ecommerce_helpdesk_com

#helpdesk api for ecommerce
module "apim_pagopa_ecommerce_helpdesk_commands_service_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-helpdesk-commands-service-api"
api_management_name = local.pagopa_apim_name
Expand All @@ -71,4 +71,4 @@ module "apim_pagopa_ecommerce_helpdesk_commands_service_api_v1" {
pagopa_vpn = var.pagopa_vpn.ips[0]
pagopa_vpn_dr = var.pagopa_vpn_dr.ips[0]
})
}
}
8 changes: 4 additions & 4 deletions src/domains/ecommerce-app/04_apim_ecommerce_io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "azurerm_api_management_named_value" "ecommerce-io-jwt-signing-key" {
##############

module "apim_ecommerce_io_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-io"
display_name = "eCommerce for IO App"
Expand Down Expand Up @@ -92,7 +92,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_io_webview_pay_v1"
}

module "apim_ecommerce_io_webview_pay_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-io-api-webiew-pay"
resource_group_name = local.pagopa_apim_rg
Expand Down Expand Up @@ -145,7 +145,7 @@ resource "azurerm_api_management_api_version_set" "ecommerce_io_outcomes_api" {
}

module "apim_ecommerce_io_outcomes_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.3.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-io-outcomes-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -177,7 +177,7 @@ module "apim_ecommerce_io_outcomes_api_v1" {
###########################

module "apim_ecommerce_io_api_v2" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-io-api"
resource_group_name = local.pagopa_apim_rg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {

#Product that contains api that pagoPA exposes to PSP's for redirect payment flow integration
module "apim_ecommerce_redirect_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-redirect"
display_name = "eCommerce for redirect pagoPA"
Expand All @@ -40,7 +40,7 @@ resource "azurerm_api_management_api_version_set" "apim_ecommerce_redirect_outco
}

module "apim_ecommerce_redirect_outcome_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-redirect-outcome-api"
resource_group_name = local.pagopa_apim_rg
Expand Down
4 changes: 2 additions & 2 deletions src/domains/ecommerce-app/04_apim_ecommerce_webview.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "azurerm_api_management_named_value" "ecommerce-webview-jwt-signing-key
##############

module "apim_ecommerce_webview_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "ecommerce-webview"
display_name = "eCommerce for webview"
Expand Down Expand Up @@ -54,7 +54,7 @@ resource "azurerm_api_management_api_version_set" "apim_ecommerce_webview_api" {
}

module "apim_ecommerce_webview_api_v1" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v6.6.0"
source = "./.terraform/modules/__v3__/api_management_api"

name = "${local.project}-ecommerce-webview-api"
resource_group_name = local.pagopa_apim_rg
Expand Down
2 changes: 1 addition & 1 deletion src/domains/ecommerce-app/05_aks_middleware_tools.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "tls_checker" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//tls_checker?ref=v6.7.0"
source = "./.terraform/modules/__v3__/tls_checker"

https_endpoint = local.ecommerce_hostname
alert_name = local.ecommerce_hostname
Expand Down
Loading

0 comments on commit 2bed043

Please sign in to comment.