Skip to content

Commit

Permalink
feat: Upgraded wallet-app tf provider (#2601)
Browse files Browse the repository at this point in the history
Upgraded wallet-app tf provider
  • Loading branch information
mamari90 authored Nov 25, 2024
1 parent 4e69d08 commit 69706a8
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 74 deletions.
74 changes: 37 additions & 37 deletions src/domains/wallet-app/.terraform.lock.hcl

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

2 changes: 1 addition & 1 deletion src/domains/wallet-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.3.0"
source = "./.terraform/modules/__v3__/kubernetes_pod_identity"

resource_group_name = local.aks_resource_group_name
location = var.location
Expand Down
10 changes: 5 additions & 5 deletions src/domains/wallet-app/04_apim_payment_wallet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "azurerm_api_management_group" "payment-wallet" {
##############
/*
module "apim_payment_wallet_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 = "payment-wallet"
display_name = "payment wallet pagoPA"
Expand Down Expand Up @@ -54,7 +54,7 @@ resource "azurerm_api_management_api_version_set" "payment_wallet_api" {
}
module "apim_payment_wallet_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}-payment-wallet-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -169,7 +169,7 @@ resource "azurerm_api_management_api_version_set" "npg_notifications_api" {
}
module "apim_wallet_service_notifications_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}-notifications-service-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -219,7 +219,7 @@ resource "azurerm_api_management_api_version_set" "wallet_webview_api" {
}
module "apim_webview_payment_wallet_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}-webview-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -311,7 +311,7 @@ resource "azurerm_api_management_api_version_set" "wallet_outcomes_api" {
}
module "apim_payment_wallet_outcomes_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}-outcomes-api"
api_management_name = local.pagopa_apim_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "azurerm_api_management_api_version_set" "payment_wallet_for_ecommerce_
}
module "apim_payment_wallet_for_ecommerce_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}-payment-wallet-for-ecommerce-api"
api_management_name = local.pagopa_apim_name
Expand All @@ -47,4 +47,4 @@ module "apim_payment_wallet_for_ecommerce_api_v1" {
hostname = local.wallet_hostname
})
}
*/
*/
6 changes: 3 additions & 3 deletions src/domains/wallet-app/04_apim_payment_wallet_migrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "azurerm_api_management_api_version_set" "payment_wallet_migrations_for
module "apim_payment_wallet_migrations_api_v1" {
count = var.payment_wallet_migrations_enabled ? 1 : 0
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}-migrations-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -67,7 +67,7 @@ module "apim_payment_wallet_migrations_api_v1" {
module "apim_payment_wallet_migrations_for_cstar_api_v1" {
count = var.payment_wallet_migrations_enabled ? 1 : 0
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}-migrations-for-cstar-api"
api_management_name = local.pagopa_apim_name
Expand Down Expand Up @@ -105,4 +105,4 @@ resource "azurerm_api_management_api_operation_policy" "create_wallet_pm" {
pdv_api_base_path = var.pdv_api_base_path
}
)
}*/
}*/
32 changes: 16 additions & 16 deletions src/domains/wallet-app/05_aks_middleware_tools.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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.wallet_hostname
alert_name = local.wallet_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.wallet_hostname
alert_name = local.wallet_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
kv_secret_name_for_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_tenant_id = data.azurerm_client_config.current.tenant_id
}

resource "helm_release" "cert_mounter" {
Expand Down
9 changes: 7 additions & 2 deletions src/domains/wallet-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.5.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.59.0
source = "git::https://github.com/pagopa/terraform-azurerm-v3?ref=3fc1dafaf4354e24ca8673005ec0caf4106343a3"
}
17 changes: 9 additions & 8 deletions src/domains/wallet-app/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# wallet-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.5.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_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 | 3fc1dafaf4354e24ca8673005ec0caf4106343a3 |
| <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 All @@ -26,8 +27,8 @@
| [azurerm_key_vault_secret.aks_apiserver_url](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
| [azurerm_key_vault_secret.azure_devops_sa_cacrt](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
| [azurerm_key_vault_secret.azure_devops_sa_token](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
| [helm_release.cert_mounter](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) | resource |
| [helm_release.reloader](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) | resource |
| [helm_release.cert_mounter](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.reloader](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubernetes_namespace.namespace](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) | resource |
| [kubernetes_namespace.namespace_system](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) | resource |
| [kubernetes_role_binding.deployer_binding](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/role_binding) | resource |
Expand Down Expand Up @@ -80,4 +81,4 @@
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->

0 comments on commit 69706a8

Please sign in to comment.