Skip to content

Commit

Permalink
feat: Upgraded gpsapp tf provider (#2583)
Browse files Browse the repository at this point in the history
upgraded gpsapp tf provider
  • Loading branch information
mamari90 authored Nov 22, 2024
1 parent 44c285d commit 7be83a2
Show file tree
Hide file tree
Showing 23 changed files with 180 additions and 137 deletions.
86 changes: 57 additions & 29 deletions src/domains/gps-app/.terraform.lock.hcl

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

18 changes: 9 additions & 9 deletions src/domains/gps-app/00_alert_gpd_ingestion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ locals {

fn_name_for_alerts_exceptions = var.env_short != "p" ? [] : [
{
id: "paymentoptionprocessor"
id : "paymentoptionprocessor"
name : "PaymentOptionProcessor"
},
{
id: "paymentpositionprocessor"
id : "paymentpositionprocessor"
name : "PaymentPositionProcessor"
},
{
id: "transferprocessor"
id : "transferprocessor"
name : "TransferProcessor"
}
]
Expand All @@ -24,7 +24,7 @@ locals {
}

resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-availability" {
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
resource_group_name = "dashboards"
name = "pagopa-${var.env_short}-gpd-ingestion-manager-availability-${each.value.id}"
location = var.location
Expand Down Expand Up @@ -52,7 +52,7 @@ union traces, exceptions
//| render timechart
| where availability < threshold
QUERY
, each.value.name)
, each.value.name)
severity = 1
frequency = 5
time_window = 5
Expand All @@ -63,7 +63,7 @@ union traces, exceptions
}

resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-error-json" {
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
resource_group_name = "dashboards"
name = "pagopa-${var.env_short}-gpd-ingestion-manager-error-json-${each.value.id}"
location = var.location
Expand Down Expand Up @@ -95,7 +95,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-er
}

resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-error-generic" {
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
resource_group_name = "dashboards"
name = "pagopa-${var.env_short}-gpd-ingestion-manager-error-generic-${each.value.id}"
location = var.location
Expand Down Expand Up @@ -127,7 +127,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-er
}

resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-error-pdv-tokenizer" {
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
resource_group_name = "dashboards"
name = "pagopa-${var.env_short}-gpd-ingestion-manager-error-pdv-tokenizer-${each.value.id}"
location = var.location
Expand Down Expand Up @@ -159,7 +159,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-er
}

resource "azurerm_monitor_scheduled_query_rules_alert" "gpd-ingestion-manager-error-unexpected-pdv-tokenizer" {
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
for_each = { for c in local.fn_name_for_alerts_exceptions : c.name => c }
resource_group_name = "dashboards"
name = "pagopa-${var.env_short}-gpd-ingestion-manager-error-unexpected-pdv-tokenizer-${each.value.id}"
location = var.location
Expand Down
2 changes: 1 addition & 1 deletion src/domains/gps-app/00_network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data "azurerm_subnet" "canoneunico_function_snet" {

# Subnet to host ecommerce transactions function
module "reporting_function_snet" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v6.4.1"
source = "./.terraform/modules/__v3__/subnet"
name = "${local.project}-reporting-fn-snet"
address_prefixes = var.cidr_subnet_reporting_functions
resource_group_name = local.vnet_resource_group_name
Expand Down
2 changes: 1 addition & 1 deletion src/domains/gps-app/02_namespace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "kubernetes_namespace" "namespace" {
}

module "pod_identity" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_pod_identity?ref=v6.4.1"
source = "./.terraform/modules/__v3__/kubernetes_pod_identity"

resource_group_name = local.aks_resource_group_name
location = var.location
Expand Down
2 changes: 1 addition & 1 deletion src/domains/gps-app/04_apim_gpd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
########################################################

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

product_id = "debt-positions-integration"
display_name = "GPD Debt Positions integration for organizations"
Expand Down
12 changes: 6 additions & 6 deletions src/domains/gps-app/04_apim_gpd_core.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Products ##

module "apim_gpd_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3//api_management_product?ref=v6.11.2"
source = "./.terraform/modules/__v3__/api_management_product"
product_id = "product-gpd"
display_name = "GPD pagoPA"
description = "Prodotto Gestione Posizione Debitorie"
Expand All @@ -24,7 +24,7 @@ module "apim_gpd_product" {
## API ##

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

name = format("%s-api-gpd-api", var.env_short)
api_management_name = local.pagopa_apim_name
Expand All @@ -51,7 +51,7 @@ module "apim_api_gpd_api" {
}

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

name = "${var.env_short}-api-gpd-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -93,7 +93,7 @@ resource "azurerm_api_management_api_version_set" "api_gpd_api" {
## Products ##

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

product_id = "debt-positions"
display_name = "GPD Debt Positions for organizations"
Expand Down Expand Up @@ -121,7 +121,7 @@ resource "azurerm_api_management_api_version_set" "api_debt_positions_api" {
}

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

name = format("%s-debt-positions-service-api", local.product)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -149,7 +149,7 @@ module "apim_api_debt_positions_api_v1" {

module "apim_api_debt_positions_api_v2" {
count = var.env_short != "p" ? 1 : 0 # disbled v2 external bulk prod
source = "git::https://github.com/pagopa/terraform-azurerm-v3//api_management_api?ref=v6.11.2"
source = "./.terraform/modules/__v3__/api_management_api"

name = format("%s-debt-positions-service-api", local.product)
api_management_name = local.pagopa_apim_name
Expand Down
6 changes: 3 additions & 3 deletions src/domains/gps-app/04_apim_gpd_for_pn_aca.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ locals {
############################

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

product_id = "pn-integration"
display_name = "PN Integration"
Expand All @@ -67,7 +67,7 @@ module "apim_pn_integration_product" {
#############################

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

product_id = "aca-integration"
display_name = "ACA Integration"
Expand Down Expand Up @@ -98,7 +98,7 @@ resource "azurerm_api_management_api_version_set" "api_pn_integration_api" {
}

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

name = format("%s-pn-integration-gpd-api-aks", var.env_short)
api_management_name = local.pagopa_apim_name
Expand Down
6 changes: 3 additions & 3 deletions src/domains/gps-app/04_apim_gpd_payments.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ locals {
###################

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

product_id = "gpd-payments-soap"
display_name = "GPD Payments pagoPA - SOAP"
Expand Down Expand Up @@ -126,7 +126,7 @@ resource "azurerm_api_management_api_operation_policy" "paSendRT_v2_wisp_api_pol
###################

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

product_id = "gpd-payments-rest-aks"
display_name = "GPD Payments pagoPA - REST for Auth"
Expand Down Expand Up @@ -156,7 +156,7 @@ resource "azurerm_api_management_api_version_set" "api_gpd_payments_rest_externa
}

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

name = format("%s-gpd-payments-rest-api-aks", var.env_short)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/gps-app/04_apim_gpd_reporting.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {
##############

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

product_id = "product-gpd-reporting"
display_name = "GPD Reporting Analysis pagoPA"
Expand Down Expand Up @@ -48,7 +48,7 @@ resource "azurerm_api_management_api_version_set" "api_gpd_reporting_analysis_ap


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

name = format("%s-api-gpd-reporting-analysis-api", var.env_short)
api_management_name = local.pagopa_apim_name
Expand Down
2 changes: 1 addition & 1 deletion src/domains/gps-app/04_apim_gpd_upload.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "azurerm_api_management_api_version_set" "apim_gpd_upload_api" {
}

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

name = "${local.product}-gpd-upload-api"
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/gps-app/04_apim_gps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

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

product_id = "spontaneouspayments"
display_name = "GPS pagoPA"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_gps_api" {


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

name = format("%s-spontaneous-payments-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
Loading

0 comments on commit 7be83a2

Please sign in to comment.