Skip to content

Commit

Permalink
feat: Upgraded nodo-app tf provider (#2587)
Browse files Browse the repository at this point in the history
* upgraded nodo-app tf provider

* precommit
  • Loading branch information
mamari90 authored Nov 22, 2024
1 parent 31dcabb commit e3b79af
Show file tree
Hide file tree
Showing 41 changed files with 262 additions and 229 deletions.
108 changes: 54 additions & 54 deletions src/domains/nodo-app/.terraform.lock.hcl

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

8 changes: 4 additions & 4 deletions src/domains/nodo-app/00_network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data "azurerm_subnet" "aks_snet" {

module "nodo_re_to_datastore_function_snet" {
count = var.enable_nodo_re ? 1 : 0
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v6.4.1"
source = "./.terraform/modules/__v3__/subnet"
name = "${local.project}-nodo-re-to-datastore-fn-snet"
address_prefixes = var.nodo_re_to_datastore_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand All @@ -33,7 +33,7 @@ module "nodo_re_to_datastore_function_snet" {

module "nodo_re_to_tablestorage_function_snet" {
count = var.enable_nodo_re ? 1 : 0
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v6.4.1"
source = "./.terraform/modules/__v3__/subnet"
name = "${local.project}-nodo-re-to-tablestorage-fn-snet"
address_prefixes = var.nodo_re_to_tablestorage_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand All @@ -55,7 +55,7 @@ module "nodo_re_to_tablestorage_function_snet" {
}

module "nodo_verifyko_to_datastore_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}-nodo-verifyko-to-datastore-fn-snet"
address_prefixes = var.nodo_verifyko_to_datastore_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand All @@ -77,7 +77,7 @@ module "nodo_verifyko_to_datastore_function_snet" {
}

module "nodo_verifyko_to_tablestorage_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}-nodo-verifyko-to-tablestorage-fn-snet"
address_prefixes = var.nodo_verifyko_to_tablestorage_function_subnet
resource_group_name = local.vnet_resource_group_name
Expand Down
5 changes: 5 additions & 0 deletions src/domains/nodo-app/01_aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ resource "azurerm_kubernetes_cluster_node_pool" "nodo_pool" {
vnet_subnet_id = data.azurerm_subnet.aks_snet.id
enable_node_public_ip = false

upgrade_settings {
max_surge = "50%"
drain_timeout_in_minutes = 30
node_soak_duration_in_minutes = 0
}

tags = merge(var.tags, var.nodo_user_node_pool.node_tags)

Expand Down
2 changes: 1 addition & 1 deletion src/domains/nodo-app/02_namespace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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: 2 additions & 0 deletions src/domains/nodo-app/02_security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ data "azurerm_key_vault" "kv" {
name = "${local.product}-${var.domain}-kv"
resource_group_name = "${local.product}-${var.domain}-sec-rg"
}


2 changes: 1 addition & 1 deletion src/domains/nodo-app/04_apim_cfg_for_node.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Products ##
##############
module "apim_cfg_for_node_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.20.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "cfg-for-node"
display_name = "CFG for Node"
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_ec.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_mock_ec_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"
count = var.env_short != "p" ? 1 : 0

product_id = "mock_ec"
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_ec_api" {


module "apim_api_mock_ec_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"
count = var.env_short != "p" ? 1 : 0

name = format("%s-mock-ec-service-api", local.project)
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_ec_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################

module "apim_mock_ec_product_replica" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.4.1"
source = "./.terraform/modules/__v3__/api_management_product"
count = var.env_short == "p" ? 0 : 1
product_id = "mock_ec_replica"
display_name = "Mock EC for REPLICA NDP"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_ec_api_replica" {


module "apim_api_mock_ec_api_replica_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"
count = var.env_short == "p" ? 0 : 1
name = format("%s-mock-ec-service-api-replica", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_ec_secondary-replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################

module "apim_mock_ec_secondary_product_replica" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.4.1"
source = "./.terraform/modules/__v3__/api_management_product"
count = var.env_short == "d" ? 1 : 0
product_id = "mock_ec_secondary_replica"
display_name = "Mock EC (Secondary) for REPLICA NDP"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_ec_secondary_api_rep


module "apim_api_mock_ec_secondary_api_replica_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"
count = var.env_short == "d" ? 1 : 0
name = format("%s-mock-ec-secondary-service-api-replica", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_ec_secondary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_mock_ec_secondary_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"
count = var.env_short == "d" ? 1 : 0
product_id = "mock_ec_secondary"
display_name = "Mock EC (Secondary) for NDP"
Expand Down Expand Up @@ -47,7 +47,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_ec_secondary_api" {
module "apim_api_mock_ec_secondary_api_v1" {
count = var.env_short == "d" ? 1 : 0

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-mock-ec-secondary-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_pm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_mock_pm_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"
count = var.env_short == "d" ? 1 : 0

product_id = "mock_pm"
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_pm_api" {


module "apim_api_mock_pm_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"
count = var.env_short == "d" ? 1 : 0

name = format("%s-mock-pm-service-api", local.project)
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_psp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_mock_psp_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"
count = var.env_short == "d" ? 1 : 0

product_id = "mock_psp"
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_psp_api" {


module "apim_api_mock_psp_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"
count = var.env_short == "d" ? 1 : 0

name = format("%s-mock-psp-service-api", local.project)
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_psp_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################

module "apim_mock_psp_product_replica" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.4.1"
source = "./.terraform/modules/__v3__/api_management_product"
count = var.env_short == "p" ? 0 : 1
product_id = "mock_psp_replica"
display_name = "Mock PSP for REPLICA NDP"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_psp_api_replica" {


module "apim_api_mock_psp_api_replica_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"
count = var.env_short == "p" ? 0 : 1
name = format("%s-mock-psp-service-api-replica", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_psp_secondary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_mock_psp_secondary_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"
count = var.env_short == "d" ? 1 : 0

product_id = "mock_psp_secondary"
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_psp_secondary_api" {


module "apim_api_mock_psp_secondary_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"
count = var.env_short == "d" ? 1 : 0

name = format("%s-mock-psp-secondary-service-api", local.project)
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_mock_psp_secondary_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################

module "apim_mock_psp_secondary_product_replica" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.4.1"
source = "./.terraform/modules/__v3__/api_management_product"
count = var.env_short == "d" ? 1 : 0
product_id = "mock_psp_secondary_replica"
display_name = "Mock PSP (Secondary) for REPLICA NDP"
Expand Down Expand Up @@ -44,7 +44,7 @@ resource "azurerm_api_management_api_version_set" "api_mock_psp_secondary_api_re


module "apim_api_mock_psp_secondary_api_replica_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"
count = var.env_short == "d" ? 1 : 0
name = format("%s-mock-psp-secondary-service-api-replica", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/nodo-app/04_apim_nodo_datamigration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ locals {
## Products ##
##############
module "apim_nododatamigration_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 = "nodo-data-migration"
display_name = local.apim_nododatamigration_api.display_name
Expand All @@ -38,7 +38,7 @@ resource "azurerm_api_management_api_version_set" "api_datamigration_api" {
}

module "apim_api_nododatamigration_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-nodo-datamigration-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
Loading

0 comments on commit e3b79af

Please sign in to comment.