diff --git a/src/domains/messages-common/04_storage.tf b/src/domains/messages-common/04_storage.tf index 1189380a7..15e5b2528 100644 --- a/src/domains/messages-common/04_storage.tf +++ b/src/domains/messages-common/04_storage.tf @@ -80,3 +80,28 @@ resource "azurerm_key_vault_secret" "push_notifications_storage_connection_strin key_vault_id = module.key_vault.id } + +##################################################### +module "push_notifications_storage_itn" { + source = "github.com/pagopa/dx//infra/modules/azure_storage_account?ref=main" + + environment = local.itn_environment + tier = "l" + resource_group_name = "${local.prefix}-${local.env_short}-${local.location}-messages-notifications-rg" + + force_public_network_access_enabled = true + subnet_pep_id = module.common_values.pep_subnets.itn.id + private_dns_zone_resource_group_name = module.common_values.resource_groups.weu.common + + access_tier = "Hot" + subservices_enabled = { + queue = true + } + + tags = var.tags +} + +resource "azurerm_storage_queue" "push_notifications_queue_itn" { + name = "push-notifications" + storage_account_name = module.push_notifications_storage_itn.name +} \ No newline at end of file diff --git a/src/domains/messages-common/07_data.tf b/src/domains/messages-common/07_data.tf new file mode 100644 index 000000000..e69de29bb diff --git a/src/domains/messages-common/99_locals.tf b/src/domains/messages-common/99_locals.tf index b03dedabd..b12c7f0ee 100644 --- a/src/domains/messages-common/99_locals.tf +++ b/src/domains/messages-common/99_locals.tf @@ -17,4 +17,16 @@ locals { apim_v2_name = "${local.product}-apim-v2-api" apim_resource_group_name = "${local.product}-rg-internal" -} + + secondary_location = "italynorth" + app_name = "notif" + + itn_environment = { + prefix = var.prefix + env_short = var.env_short + location = local.secondary_location + app_name = local.app_name + domain = "messages" + instance_number = "01" + } +} \ No newline at end of file diff --git a/src/domains/messages-common/99_main.tf b/src/domains/messages-common/99_main.tf index f6d35293a..375a2c72a 100644 --- a/src/domains/messages-common/99_main.tf +++ b/src/domains/messages-common/99_main.tf @@ -28,3 +28,7 @@ provider "azurerm" { data "azurerm_subscription" "current" {} data "azurerm_client_config" "current" {} + +module "common_values" { + source = "../../_modules/common_values" +} \ No newline at end of file diff --git a/src/domains/messages-common/README.md b/src/domains/messages-common/README.md index b45ff4ed0..75c17157c 100644 --- a/src/domains/messages-common/README.md +++ b/src/domains/messages-common/README.md @@ -28,6 +28,8 @@ | [apim\_v2\_product\_notifications](#module\_apim\_v2\_product\_notifications) | github.com/pagopa/terraform-azurerm-v3//api_management_product | v8.27.0 | | [apim\_v2\_service\_messages\_internal\_api\_v1](#module\_apim\_v2\_service\_messages\_internal\_api\_v1) | github.com/pagopa/terraform-azurerm-v3//api_management_api | v8.27.0 | | [apim\_v2\_service\_messages\_manage\_api\_v1](#module\_apim\_v2\_service\_messages\_manage\_api\_v1) | github.com/pagopa/terraform-azurerm-v3//api_management_api | v8.27.0 | +| [azure\_storage\_account](#module\_azure\_storage\_account) | github.com/pagopa/dx//infra/modules/azure_storage_account | main | +| [common\_values](#module\_common\_values) | ../../_modules/common_values | n/a | | [cosmosdb\_account\_mongodb\_reminder](#module\_cosmosdb\_account\_mongodb\_reminder) | github.com/pagopa/terraform-azurerm-v3//cosmosdb_account | v8.27.0 | | [cosmosdb\_account\_remote\_content](#module\_cosmosdb\_account\_remote\_content) | github.com/pagopa/terraform-azurerm-v3//cosmosdb_account | v8.27.0 | | [cosmosdb\_sql\_database\_remote\_content](#module\_cosmosdb\_sql\_database\_remote\_content) | github.com/pagopa/terraform-azurerm-v3//cosmosdb_sql_database | v8.27.0 |