diff --git a/src/domains/checkout-app/.terraform.lock.hcl b/src/domains/checkout-app/.terraform.lock.hcl index 1f0b0cdf33..df7ed859d2 100644 --- a/src/domains/checkout-app/.terraform.lock.hcl +++ b/src/domains/checkout-app/.terraform.lock.hcl @@ -27,7 +27,7 @@ provider "registry.terraform.io/hashicorp/azuread" { provider "registry.terraform.io/hashicorp/azurerm" { version = "3.97.1" - constraints = ">= 3.30.0, >= 3.39.0, >= 3.76.0, >= 3.95.0, <= 3.97.1, <= 3.99.0" + constraints = ">= 3.30.0, ~> 3.30, ~> 3.76, ~> 3.95, <= 3.97.1, <= 3.116.0" hashes = [ "h1:LtwGbd4HEb5QCXmdxSvTjPSh8/Gp8eAQMYfiAKaubV4=", "h1:b8yfRYs+CepOlnx1JeQVMTX3N6HHfS85iOXE8hn8yok=", @@ -51,7 +51,7 @@ provider "registry.terraform.io/hashicorp/azurerm" { provider "registry.terraform.io/hashicorp/null" { version = "3.2.1" - constraints = "3.2.1, <= 3.2.1" + constraints = "~> 3.2, 3.2.1" hashes = [ "h1:FbGfc+muBsC17Ohy5g806iuI1hQc4SIexpYCrQHQd8w=", "h1:tSj1mL6OQ8ILGqR2mDu7OYYYWf+hoir0pf9KAQ8IzO8=", diff --git a/src/domains/checkout-app/04_apim_checkout.tf b/src/domains/checkout-app/04_apim_checkout.tf index 9c393e01b6..e8f181b244 100644 --- a/src/domains/checkout-app/04_apim_checkout.tf +++ b/src/domains/checkout-app/04_apim_checkout.tf @@ -4,7 +4,7 @@ module "apim_checkout_product" { count = var.checkout_enabled ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_product" product_id = "checkout" display_name = "checkout pagoPA" @@ -23,7 +23,7 @@ module "apim_checkout_product" { module "apim_checkout_auth_product" { count = var.checkout_enabled ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_product" product_id = "checkout-auth" display_name = "checkout auth pagoPA" @@ -71,7 +71,7 @@ resource "azurerm_api_management_api_version_set" "checkout_payment_activations_ } module "apim_checkout_payment_activations_api_v1" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = format("%s-checkout-payment-activations-api", local.parent_project) api_management_name = data.azurerm_api_management.apim.name @@ -125,7 +125,7 @@ resource "azurerm_api_management_api_version_set" "checkout_payment_activations_ } module "apim_checkout_payment_activations_api_auth_v1" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = format("%s-checkout-payment-activations-auth-api", local.parent_project) api_management_name = data.azurerm_api_management.apim.name @@ -151,7 +151,7 @@ module "apim_checkout_payment_activations_api_auth_v1" { # Payment activation v2 authenticated APIs module "apim_checkout_payment_activations_api_auth_v2" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = format("%s-checkout-payment-activations-auth-api", local.parent_project) api_management_name = data.azurerm_api_management.apim.name @@ -272,7 +272,7 @@ resource "azurerm_api_management_api_version_set" "checkout_transactions_api" { module "apim_checkout_transactions_api_v1" { count = var.checkout_enabled ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = format("%s-checkout-transactions-api", var.env_short) api_management_name = data.azurerm_api_management.apim.name @@ -319,7 +319,7 @@ resource "azurerm_api_management_api_version_set" "checkout_ecommerce_api_v1" { } module "apim_checkout_ecommerce_api_v1" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = "${local.parent_project}-checkout-ecommerce-api" api_management_name = data.azurerm_api_management.apim.name diff --git a/src/domains/checkout-app/04_apim_checkout_carts_auth.tf b/src/domains/checkout-app/04_apim_checkout_carts_auth.tf index 8b97e2f0c4..37fee6950b 100644 --- a/src/domains/checkout-app/04_apim_checkout_carts_auth.tf +++ b/src/domains/checkout-app/04_apim_checkout_carts_auth.tf @@ -3,7 +3,7 @@ ############## module "apim_checkout_carts_auth" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_product" product_id = "checkout-carts" display_name = "Checkout pagoPA carts" @@ -40,7 +40,7 @@ resource "azurerm_api_management_api_version_set" "checkout_carts_auth_api_v1" { } module "apim_checkout_carts_auth_v1" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = "${local.parent_project}-carts-auth-api" api_management_name = data.azurerm_api_management.apim.name diff --git a/src/domains/checkout-app/04_apim_checkout_ec.tf b/src/domains/checkout-app/04_apim_checkout_ec.tf index ef62865c57..6ad4d7a6b6 100644 --- a/src/domains/checkout-app/04_apim_checkout_ec.tf +++ b/src/domains/checkout-app/04_apim_checkout_ec.tf @@ -3,7 +3,7 @@ ############## module "apim_checkout_ec_product" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_product" product_id = "checkout-ec" display_name = "checkout pagoPA for ECs" @@ -40,7 +40,7 @@ resource "azurerm_api_management_api_version_set" "checkout_ec_api_v1" { } module "apim_checkout_ec_api_v1" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.76.1" + source = "./.terraform/modules/__v3__/api_management_api" name = "${local.parent_project}-checkout-ec-api" api_management_name = data.azurerm_api_management.apim.name diff --git a/src/domains/checkout-app/05_checkout_fe.tf b/src/domains/checkout-app/05_checkout_fe.tf index ea6be5c9bd..3989491550 100644 --- a/src/domains/checkout-app/05_checkout_fe.tf +++ b/src/domains/checkout-app/05_checkout_fe.tf @@ -19,7 +19,7 @@ resource "azurerm_resource_group" "checkout_fe_rg" { * CDN */ module "checkout_cdn" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cdn?ref=v7.76.1" + source = "./.terraform/modules/__v3__/cdn" count = var.checkout_enabled ? 1 : 0 name = "checkout" diff --git a/src/domains/checkout-app/05_checkout_function.tf b/src/domains/checkout-app/05_checkout_function.tf index 2811f82aaf..cfab53f44c 100644 --- a/src/domains/checkout-app/05_checkout_function.tf +++ b/src/domains/checkout-app/05_checkout_function.tf @@ -8,8 +8,9 @@ resource "azurerm_resource_group" "checkout_be_rg" { # Subnet to host checkout function module "checkout_function_snet" { - count = var.checkout_enabled && var.cidr_subnet_checkout_be != null ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v7.76.1" + count = var.checkout_enabled && var.cidr_subnet_checkout_be != null ? 1 : 0 + source = "./.terraform/modules/__v3__/subnet" + name = format("%s-checkout-be-snet", local.parent_project) address_prefixes = var.cidr_subnet_checkout_be resource_group_name = data.azurerm_resource_group.rg_vnet.name @@ -33,7 +34,7 @@ module "checkout_function_snet" { module "checkout_function" { count = var.checkout_enabled ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app?ref=v7.76.1" + source = "./.terraform/modules/__v3__/function_app" resource_group_name = azurerm_resource_group.checkout_be_rg[0].name name = format("%s-fn-checkout", local.parent_project) diff --git a/src/domains/checkout-app/05_pagopa_proxy.tf b/src/domains/checkout-app/05_pagopa_proxy.tf index d827db09a2..775600eff7 100644 --- a/src/domains/checkout-app/05_pagopa_proxy.tf +++ b/src/domains/checkout-app/05_pagopa_proxy.tf @@ -41,14 +41,14 @@ data "azurerm_redis_cache" "pagopa_proxy_redis" { module "pagopa_proxy_app_service" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service?ref=v7.76.1" + source = "./.terraform/modules/__v3__/app_service" depends_on = [ module.pagopa_proxy_snet ] - - resource_group_name = data.azurerm_resource_group.pagopa_proxy_rg.name - location = var.location + ip_restriction_default_action = "Allow" + resource_group_name = data.azurerm_resource_group.pagopa_proxy_rg.name + location = var.location # App service plan vars plan_name = format("%s-plan-pagopa-proxy", local.parent_project) @@ -79,7 +79,7 @@ module "pagopa_proxy_app_service" { module "pagopa_proxy_app_service_slot_staging" { count = var.env_short == "p" ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service_slot?ref=v7.76.1" + source = "./.terraform/modules/__v3__/app_service_slot" # App service plan # app_service_plan_id = module.pagopa_proxy_app_service.plan_id diff --git a/src/domains/checkout-app/05_pagopa_proxy_ha.tf b/src/domains/checkout-app/05_pagopa_proxy_ha.tf index b6bbe915a2..98714a4184 100644 --- a/src/domains/checkout-app/05_pagopa_proxy_ha.tf +++ b/src/domains/checkout-app/05_pagopa_proxy_ha.tf @@ -1,9 +1,10 @@ module "pagopa_proxy_app_service_ha" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service?ref=v7.76.1" + source = "./.terraform/modules/__v3__/app_service" count = var.pagopa_proxy_ha_enabled ? 1 : 0 depends_on = [ module.pagopa_proxy_snet_ha ] + ip_restriction_default_action = "Allow" resource_group_name = data.azurerm_resource_group.pagopa_proxy_rg.name location = var.location @@ -39,7 +40,7 @@ module "pagopa_proxy_app_service_ha" { module "pagopa_proxy_app_service_slot_staging_ha" { count = var.env_short == "p" && var.pagopa_proxy_ha_enabled ? 1 : 0 - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service_slot?ref=v7.76.1" + source = "./.terraform/modules/__v3__/app_service_slot" # App service plan # app_service_plan_id = module.pagopa_proxy_app_service.plan_id diff --git a/src/domains/checkout-app/99_main.tf b/src/domains/checkout-app/99_main.tf index 753d29dc3c..96b3e6e023 100644 --- a/src/domains/checkout-app/99_main.tf +++ b/src/domains/checkout-app/99_main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = ">= 3.95.0, <= 3.99.0" + version = "<= 3.116.0" } azuread = { source = "hashicorp/azuread" @@ -29,3 +29,7 @@ data "azurerm_subscription" "current" {} data "azurerm_client_config" "current" {} +module "__v3__" { + # v8.58.0 + source = "git::https://github.com/pagopa/terraform-azurerm-v3?ref=63f6181a6f3a51707a2ab4795bdbed2d888c708b" +} diff --git a/src/domains/checkout-app/README.md b/src/domains/checkout-app/README.md index 11ca41d50e..29e3a12093 100644 --- a/src/domains/checkout-app/README.md +++ b/src/domains/checkout-app/README.md @@ -1,37 +1,38 @@ # checkout-app - + ## Requirements | Name | Version | |------|---------| | [azuread](#requirement\_azuread) | <= 2.33.0 | -| [azurerm](#requirement\_azurerm) | >= 3.95.0, <= 3.99.0 | +| [azurerm](#requirement\_azurerm) | <= 3.116.0 | | [null](#requirement\_null) | = 3.2.1 | ## Modules | Name | Source | Version | |------|--------|---------| -| [apim\_checkout\_auth\_product](#module\_apim\_checkout\_auth\_product) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product | v7.76.1 | -| [apim\_checkout\_carts\_auth](#module\_apim\_checkout\_carts\_auth) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product | v7.76.1 | -| [apim\_checkout\_carts\_auth\_v1](#module\_apim\_checkout\_carts\_auth\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_ec\_api\_v1](#module\_apim\_checkout\_ec\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_ec\_product](#module\_apim\_checkout\_ec\_product) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product | v7.76.1 | -| [apim\_checkout\_ecommerce\_api\_v1](#module\_apim\_checkout\_ecommerce\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_payment\_activations\_api\_auth\_v1](#module\_apim\_checkout\_payment\_activations\_api\_auth\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_payment\_activations\_api\_auth\_v2](#module\_apim\_checkout\_payment\_activations\_api\_auth\_v2) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_payment\_activations\_api\_v1](#module\_apim\_checkout\_payment\_activations\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [apim\_checkout\_product](#module\_apim\_checkout\_product) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product | v7.76.1 | -| [apim\_checkout\_transactions\_api\_v1](#module\_apim\_checkout\_transactions\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v7.76.1 | -| [checkout\_cdn](#module\_checkout\_cdn) | git::https://github.com/pagopa/terraform-azurerm-v3.git//cdn | v7.76.1 | -| [checkout\_function](#module\_checkout\_function) | git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app | v7.76.1 | -| [checkout\_function\_snet](#module\_checkout\_function\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.76.1 | -| [pagopa\_proxy\_app\_service](#module\_pagopa\_proxy\_app\_service) | git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service | v7.76.1 | -| [pagopa\_proxy\_app\_service\_ha](#module\_pagopa\_proxy\_app\_service\_ha) | git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service | v7.76.1 | -| [pagopa\_proxy\_app\_service\_slot\_staging](#module\_pagopa\_proxy\_app\_service\_slot\_staging) | git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service_slot | v7.76.1 | -| [pagopa\_proxy\_app\_service\_slot\_staging\_ha](#module\_pagopa\_proxy\_app\_service\_slot\_staging\_ha) | git::https://github.com/pagopa/terraform-azurerm-v3.git//app_service_slot | v7.76.1 | +| [\_\_v3\_\_](#module\_\_\_v3\_\_) | git::https://github.com/pagopa/terraform-azurerm-v3 | 63f6181a6f3a51707a2ab4795bdbed2d888c708b | +| [apim\_checkout\_auth\_product](#module\_apim\_checkout\_auth\_product) | ./.terraform/modules/__v3__/api_management_product | n/a | +| [apim\_checkout\_carts\_auth](#module\_apim\_checkout\_carts\_auth) | ./.terraform/modules/__v3__/api_management_product | n/a | +| [apim\_checkout\_carts\_auth\_v1](#module\_apim\_checkout\_carts\_auth\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_ec\_api\_v1](#module\_apim\_checkout\_ec\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_ec\_product](#module\_apim\_checkout\_ec\_product) | ./.terraform/modules/__v3__/api_management_product | n/a | +| [apim\_checkout\_ecommerce\_api\_v1](#module\_apim\_checkout\_ecommerce\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_payment\_activations\_api\_auth\_v1](#module\_apim\_checkout\_payment\_activations\_api\_auth\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_payment\_activations\_api\_auth\_v2](#module\_apim\_checkout\_payment\_activations\_api\_auth\_v2) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_payment\_activations\_api\_v1](#module\_apim\_checkout\_payment\_activations\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_checkout\_product](#module\_apim\_checkout\_product) | ./.terraform/modules/__v3__/api_management_product | n/a | +| [apim\_checkout\_transactions\_api\_v1](#module\_apim\_checkout\_transactions\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [checkout\_cdn](#module\_checkout\_cdn) | ./.terraform/modules/__v3__/cdn | n/a | +| [checkout\_function](#module\_checkout\_function) | ./.terraform/modules/__v3__/function_app | n/a | +| [checkout\_function\_snet](#module\_checkout\_function\_snet) | ./.terraform/modules/__v3__/subnet | n/a | +| [pagopa\_proxy\_app\_service](#module\_pagopa\_proxy\_app\_service) | ./.terraform/modules/__v3__/app_service | n/a | +| [pagopa\_proxy\_app\_service\_ha](#module\_pagopa\_proxy\_app\_service\_ha) | ./.terraform/modules/__v3__/app_service | n/a | +| [pagopa\_proxy\_app\_service\_slot\_staging](#module\_pagopa\_proxy\_app\_service\_slot\_staging) | ./.terraform/modules/__v3__/app_service_slot | n/a | +| [pagopa\_proxy\_app\_service\_slot\_staging\_ha](#module\_pagopa\_proxy\_app\_service\_slot\_staging\_ha) | ./.terraform/modules/__v3__/app_service_slot | n/a | | [pagopa\_proxy\_snet](#module\_pagopa\_proxy\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.76.1 | | [pagopa\_proxy\_snet\_ha](#module\_pagopa\_proxy\_snet\_ha) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.76.1 | @@ -135,4 +136,4 @@ ## Outputs No outputs. - +