Skip to content

Commit

Permalink
feat: Upgraded aca-app tf provider (#2573)
Browse files Browse the repository at this point in the history
upgraded aca-app tf provider
  • Loading branch information
mamari90 authored Nov 21, 2024
1 parent 3b07083 commit 4a7b3ad
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 80 deletions.
78 changes: 29 additions & 49 deletions src/domains/aca-app/.terraform.lock.hcl

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

4 changes: 2 additions & 2 deletions src/domains/aca-app/04_apim_aca.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

module "apim_aca_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 = "aca"
display_name = "ACA pagoPA"
Expand Down Expand Up @@ -43,7 +43,7 @@ resource "azurerm_api_management_api_version_set" "aca_api" {
}

module "apim_aca_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 = format("%s-api", local.project)
api_management_name = local.pagopa_apim_name
Expand Down
36 changes: 19 additions & 17 deletions src/domains/aca-app/05_aks_middleware_tools.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
module "tls_checker" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//tls_checker?ref=v6.3.0"
source = "./.terraform/modules/__v3__/tls_checker"

https_endpoint = local.aca_hostname
alert_name = local.aca_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 = "ai-${var.env_short}-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]
keyvault_name = data.azurerm_key_vault.kv.name
keyvault_tenantid = data.azurerm_client_config.current.tenant_id

https_endpoint = local.aca_hostname
alert_name = local.aca_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]
keyvault_name = data.azurerm_key_vault.kv.name
keyvault_tenant_id = data.azurerm_client_config.current.tenant_id

kv_secret_name_for_application_insights_connection_string = "ai-${var.env_short}-connection-string"
}

resource "helm_release" "cert_mounter" {
Expand All @@ -41,7 +43,7 @@ resource "helm_release" "cert_mounter" {


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

resource_group_name = local.aks_resource_group_name
location = var.location
Expand Down
9 changes: 7 additions & 2 deletions src/domains/aca-app/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "<= 3.40.0"
version = "<= 3.116.0"
}
azuread = {
source = "hashicorp/azuread"
Expand All @@ -18,7 +18,7 @@ terraform {
}
helm = {
source = "hashicorp/helm"
version = "<= 2.7.1"
version = "<= 2.12.1"
}
}

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"
}
17 changes: 9 additions & 8 deletions src/domains/aca-app/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# aca-app
<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | <= 2.33.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | <= 3.40.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | <= 2.7.1 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | <= 3.116.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | <= 2.12.1 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | <= 2.11.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | <= 3.2.1 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_apim_aca_api_v1"></a> [apim\_aca\_api\_v1](#module\_apim\_aca\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api | v6.3.0 |
| <a name="module_apim_aca_product"></a> [apim\_aca\_product](#module\_apim\_aca\_product) | git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product | v6.3.0 |
| <a name="module_pod_identity"></a> [pod\_identity](#module\_pod\_identity) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_pod_identity | v6.3.0 |
| <a name="module_tls_checker"></a> [tls\_checker](#module\_tls\_checker) | git::https://github.com/pagopa/terraform-azurerm-v3.git//tls_checker | v6.3.0 |
| <a name="module___v3__"></a> [\_\_v3\_\_](#module\_\_\_v3\_\_) | git::https://github.com/pagopa/terraform-azurerm-v3 | 63f6181a6f3a51707a2ab4795bdbed2d888c708b |
| <a name="module_apim_aca_api_v1"></a> [apim\_aca\_api\_v1](#module\_apim\_aca\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a |
| <a name="module_apim_aca_product"></a> [apim\_aca\_product](#module\_apim\_aca\_product) | ./.terraform/modules/__v3__/api_management_product | n/a |
| <a name="module_pod_identity"></a> [pod\_identity](#module\_pod\_identity) | ./.terraform/modules/__v3__/kubernetes_pod_identity | n/a |
| <a name="module_tls_checker"></a> [tls\_checker](#module\_tls\_checker) | ./.terraform/modules/__v3__/tls_checker | n/a |

## Resources

Expand Down Expand Up @@ -93,4 +94,4 @@
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion src/domains/aca-app/env/weu-dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ tls_cert_check_helm = {
chart_version = "2.0.0"
image_name = "ghcr.io/pagopa/infra-ssl-check"
image_tag = "v1.3.4@sha256:c3d45736706c981493b6216451fc65e99a69d5d64409ccb1c4ca93fef57c921d"
}
}
2 changes: 1 addition & 1 deletion src/domains/aca-app/env/weu-uat/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ tls_cert_check_helm = {
chart_version = "2.0.0"
image_name = "ghcr.io/pagopa/infra-ssl-check"
image_tag = "v1.3.4@sha256:c3d45736706c981493b6216451fc65e99a69d5d64409ccb1c4ca93fef57c921d"
}
}

0 comments on commit 4a7b3ad

Please sign in to comment.