Skip to content

Commit

Permalink
feat: Paymcloud 172 fdr app (#2581)
Browse files Browse the repository at this point in the history
* upgraded tf provider fdr-app
  • Loading branch information
mamari90 authored Nov 22, 2024
1 parent db942d9 commit 44c285d
Show file tree
Hide file tree
Showing 19 changed files with 241 additions and 228 deletions.
108 changes: 54 additions & 54 deletions src/domains/fdr-app/.terraform.lock.hcl

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

6 changes: 3 additions & 3 deletions src/domains/fdr-app/00_network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data "azurerm_dns_zone" "public" {


module "fdr_re_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}-re-fn-snet"
address_prefixes = var.fdr_re_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand All @@ -37,7 +37,7 @@ module "fdr_re_function_snet" {
}

module "fdr_xml_to_json_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}-xml-to-json-fn-snet"
address_prefixes = var.fdr_xml_to_json_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand All @@ -59,7 +59,7 @@ module "fdr_xml_to_json_function_snet" {
}

module "fdr_json_to_xml_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}-json-to-xml-fn-snet"
address_prefixes = var.fdr_json_to_xml_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand Down
11 changes: 4 additions & 7 deletions src/domains/fdr-app/02_function.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ resource "azurerm_resource_group" "reporting_fdr_rg" {

# Subnet to host reporting-fdr function
module "reporting_fdr_function_snet" {
count = var.cidr_subnet_reporting_fdr != null ? 1 : 0
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v6.17.0"
count = var.cidr_subnet_reporting_fdr != null ? 1 : 0
source = "./.terraform/modules/__v3__/subnet"

name = "${local.product}-reporting-fdr-snet"
address_prefixes = var.cidr_subnet_reporting_fdr
resource_group_name = data.azurerm_resource_group.rg_vnet.name
Expand All @@ -26,7 +27,7 @@ module "reporting_fdr_function_snet" {
}

module "reporting_fdr_function" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app?ref=v6.17.0"
source = "./.terraform/modules/__v3__/function_app"

resource_group_name = azurerm_resource_group.reporting_fdr_rg.name
name = "${local.product}-fn-reportingfdr"
Expand All @@ -37,10 +38,6 @@ module "reporting_fdr_function" {
runtime_version = var.fn_app_runtime_version
always_on = var.reporting_fdr_function_always_on
application_insights_instrumentation_key = data.azurerm_application_insights.application_insights.instrumentation_key
cors = ({
allowed_origins = []
support_credentials = false
})

app_service_plan_info = var.app_service_plan_info

Expand Down
2 changes: 1 addition & 1 deletion src/domains/fdr-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=v4.1.17"
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/fdr-app/04_apim_fdr_fase1_internal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_legacy_api_internal"
}

module "apim_api_fdr_legacy_api_v1_internal" {
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}-fdr-legacy-service-api-internal"
api_management_name = local.pagopa_apim_name
Expand Down
12 changes: 6 additions & 6 deletions src/domains/fdr-app/04_apim_fdr_fase3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#########

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

product_id = "fdr-psp"
display_name = "FDR - Flussi di rendicontazione (PSP)"
Expand All @@ -29,7 +29,7 @@ module "apim_fdr_product_psp" {
#########

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

product_id = "fdr-org"
display_name = "FDR - Flussi di rendicontazione (ORGS)"
Expand All @@ -51,7 +51,7 @@ module "apim_fdr_product_org" {
###############

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

product_id = "fdr_internal"
display_name = "FDR - Flussi di rendicontazione (INTERNAL)"
Expand Down Expand Up @@ -113,7 +113,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_api_psp" {


module "apim_api_fdr_api_v1_psp" {
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}-fdr-service-api-psp"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -155,7 +155,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_api_org" {


module "apim_api_fdr_api_v1_org" {
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}-fdr-service-api-org"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -196,7 +196,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_api_internal" {
}

module "apim_api_fdr_api_v1_internal" {
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}-fdr-service-api-internal"
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/fdr-app/04_apim_fdr_json_to_xml.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

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

product_id = "fdr_json_to_xml"
display_name = "FDR - JSON to XML API REST"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_json_to_xml_api" {


module "apim_api_fdr_json_to_xml_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}-fdr-json-to-xml-service-api"
api_management_name = local.pagopa_apim_name
Expand Down
2 changes: 1 addition & 1 deletion src/domains/fdr-app/04_apim_fdr_legacy_nodo_nexi.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_fdr_nodo_dei_pagamenti_legacy_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v8.11.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "fdr-legacy"
display_name = "FdR Legacy - Nodo dei Pagamenti"
Expand Down
4 changes: 2 additions & 2 deletions src/domains/fdr-app/04_apim_fdr_xml_to_json.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

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

product_id = "fdr_xml_to_json"
display_name = "FDR - XML to JSON API REST"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_fdr_xml_to_json_api" {


module "apim_api_fdr_xml_to_json_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}-fdr-xml-to-json-service-api"
api_management_name = local.pagopa_apim_name
Expand Down
8 changes: 2 additions & 6 deletions src/domains/fdr-app/05_fdr_json_to_xml_fn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {

## Function fdr_json_to_xml
module "fdr_json_to_xml_function" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app?ref=v6.20.0"
source = "./.terraform/modules/__v3__/function_app"

resource_group_name = data.azurerm_resource_group.fdr_rg.name
name = "${local.project}-json-to-xml-fn"
Expand Down Expand Up @@ -58,10 +58,6 @@ module "fdr_json_to_xml_function" {
#sticky_connection_string_names = ["COSMOS_CONN_STRING"]
client_certificate_mode = "Optional"

cors = {
allowed_origins = []
}

app_service_plan_name = "${local.project}-json-to-xml-fn-plan"
app_service_plan_info = {
kind = var.fdr_json_to_xml_function.kind
Expand All @@ -85,7 +81,7 @@ module "fdr_json_to_xml_function" {
module "fdr_json_to_xml_function_slot_staging" {
count = var.env_short == "p" ? 1 : 0

source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app_slot?ref=v6.9.0"
source = "./.terraform/modules/__v3__/function_app_slot"

app_service_plan_id = module.fdr_json_to_xml_function.app_service_plan_id
function_app_id = module.fdr_json_to_xml_function.id
Expand Down
9 changes: 3 additions & 6 deletions src/domains/fdr-app/05_fdr_re_fn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ locals {

## Function fdr_re
module "fdr_re_function" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app?ref=v6.20.2"
source = "./.terraform/modules/__v3__/function_app"

resource_group_name = data.azurerm_resource_group.fdr_re_rg.name
name = "${local.project}-re-fn"
Expand Down Expand Up @@ -97,10 +97,6 @@ module "fdr_re_function" {
]
client_certificate_mode = "Optional"

cors = {
allowed_origins = []
}

app_service_plan_name = "${local.project}-re-fn-plan"
app_service_plan_info = {
kind = var.fdr_re_function.kind
Expand All @@ -119,13 +115,14 @@ module "fdr_re_function" {
allowed_subnets = [data.azurerm_subnet.apim_vnet.id]
allowed_ips = []


tags = var.tags
}

module "fdr_re_function_slot_staging" {
count = var.env_short == "p" ? 1 : 0

source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//function_app_slot?ref=v6.9.0"
source = "./.terraform/modules/__v3__/function_app_slot"

app_service_plan_id = module.fdr_re_function.app_service_plan_id
function_app_id = module.fdr_re_function.id
Expand Down
Loading

0 comments on commit 44c285d

Please sign in to comment.