Skip to content

Commit

Permalink
feat: Paymcloud 172 afm app (#2574)
Browse files Browse the repository at this point in the history
* Updated afm-app tf provider
  • Loading branch information
mamari90 authored Nov 21, 2024
1 parent 4a7b3ad commit 6fbe0ec
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 107 deletions.
108 changes: 54 additions & 54 deletions src/domains/afm-app/.terraform.lock.hcl

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

3 changes: 2 additions & 1 deletion src/domains/afm-app/02_namespace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ resource "kubernetes_namespace" "namespace" {
}

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


resource_group_name = local.aks_resource_group_name
location = var.location
Expand Down
13 changes: 7 additions & 6 deletions src/domains/afm-app/04_apim_afm_calculator.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ locals {
}

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

product_id = "afm-calculator"
display_name = local.apim_afm_calculator_service_api.display_name
Expand All @@ -68,7 +68,7 @@ module "apim_afm_calculator_product" {
}

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

product_id = "afm-node-calculator"
display_name = local.apim_afm_calculator_service_node_api.display_name
Expand Down Expand Up @@ -127,7 +127,7 @@ resource "azurerm_api_management_api_version_set" "api_afm_calculator_api" {


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

name = format("%s-afm-calculator-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand All @@ -154,7 +154,8 @@ module "apim_api_afm_calculator_api_v1" {
}

module "apim_api_afm_calculator_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 = format("%s-afm-calculator-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -195,7 +196,7 @@ resource "azurerm_api_management_api_version_set" "api_afm_calculator_node_api"
}

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

name = format("%s-afm-calculator-service-node-api", local.project)
api_management_name = local.pagopa_apim_name
Expand All @@ -222,7 +223,7 @@ module "apim_api_afm_calculator_api_node_v1" {
}

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

name = format("%s-afm-calculator-service-node-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
6 changes: 3 additions & 3 deletions src/domains/afm-app/04_apim_afm_marketplace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ locals {
}
}
module "apim_afm_marketplace_product" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v6.5.0"
source = "./.terraform/modules/__v3__/api_management_product"

product_id = "afm-marketplace"
display_name = local.apim_afm_marketplace_service_api.display_name
Expand All @@ -62,7 +62,7 @@ resource "azurerm_api_management_api_version_set" "api_afm_marketplace_api" {


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

name = format("%s-afm-marketplace-service-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -102,7 +102,7 @@ resource "azurerm_api_management_api_version_set" "api_afm_utils_api" {
}

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

name = format("%s-afm-utils-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
2 changes: 1 addition & 1 deletion src/domains/afm-app/04_apim_afm_marketplace_assistenza.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "azurerm_api_management_api_version_set" "api_afm_marketplace_technical


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

name = format("%s-afm-marketplace-service-technical-support-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
30 changes: 16 additions & 14 deletions src/domains/afm-app/05_aks_middleware_tools.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
module "tls_checker" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//tls_checker?ref=v5.5.2"
source = "./.terraform/modules/__v3__/tls_checker"

https_endpoint = local.afm_hostname
alert_name = local.afm_hostname
alert_enabled = true
helm_chart_present = true
helm_chart_version = var.tls_cert_check_helm.chart_version
namespace = kubernetes_namespace.namespace.metadata[0].name
helm_chart_image_name = var.tls_cert_check_helm.image_name
helm_chart_image_tag = var.tls_cert_check_helm.image_tag
location_string = var.location_string
application_insights_connection_string = data.azurerm_application_insights.application_insights.connection_string
application_insights_resource_group = data.azurerm_resource_group.monitor_rg.name
application_insights_id = data.azurerm_application_insights.application_insights.id
application_insights_action_group_ids = [data.azurerm_monitor_action_group.slack.id, data.azurerm_monitor_action_group.email.id]
https_endpoint = local.afm_hostname
alert_name = local.afm_hostname
alert_enabled = true
helm_chart_present = true
helm_chart_version = var.tls_cert_check_helm.chart_version
namespace = kubernetes_namespace.namespace.metadata[0].name
helm_chart_image_name = var.tls_cert_check_helm.image_name
helm_chart_image_tag = var.tls_cert_check_helm.image_tag
location_string = var.location_string
application_insights_resource_group = data.azurerm_resource_group.monitor_rg.name
application_insights_id = data.azurerm_application_insights.application_insights.id
application_insights_action_group_ids = [data.azurerm_monitor_action_group.slack.id, data.azurerm_monitor_action_group.email.id]
kv_secret_name_for_application_insights_connection_string = "ai-${var.env_short}-connection-string"
keyvault_name = data.azurerm_key_vault.kv.name
keyvault_tenant_id = data.azurerm_client_config.current.tenant_id
}

resource "helm_release" "cert_mounter" {
Expand Down
11 changes: 8 additions & 3 deletions src/domains/afm-app/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.30.0, <= 3.53.0"
version = "<= 3.116.0"
}
azuread = {
source = "hashicorp/azuread"
version = "= 2.21.0"
}
null = {
source = "hashicorp/null"
version = "= 3.1.1"
version = "= 3.2"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "= 2.11.0"
}
helm = {
source = "hashicorp/helm"
version = "= 2.5.1"
version = "= 2.12.0"
}
}

Expand Down Expand Up @@ -46,3 +46,8 @@ provider "helm" {
config_path = "${var.k8s_kube_config_path_prefix}/config-${local.aks_name}"
}
}

module "__v3__" {
# v8.58.0
source = "git::https://github.com/pagopa/terraform-azurerm-v3?ref=63f6181a6f3a51707a2ab4795bdbed2d888c708b"
}
Loading

0 comments on commit 6fbe0ec

Please sign in to comment.