diff --git a/src/core/README.md b/src/core/README.md index 5513b0464..f4b57208f 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -107,6 +107,7 @@ | [azurerm_dns_cname_record.assets_cdn_io_pagopa_it](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_cname_record) | resource | | [azurerm_key_vault_access_policy.access_policy_io_infra_cd](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | | [azurerm_key_vault_access_policy.access_policy_io_infra_ci](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | +| [azurerm_key_vault_access_policy.access_policy_kv_io_infra_cd](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | | [azurerm_key_vault_access_policy.adgroup_admin](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | | [azurerm_key_vault_access_policy.adgroup_admin_common](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | | [azurerm_key_vault_access_policy.adgroup_developers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy) | resource | diff --git a/src/domains/elt/_modules/function_apps/data.tf b/src/domains/elt/_modules/function_apps/data.tf index 2b016f1df..66518b2b6 100644 --- a/src/domains/elt/_modules/function_apps/data.tf +++ b/src/domains/elt/_modules/function_apps/data.tf @@ -75,6 +75,13 @@ data "azurerm_eventhub_authorization_rule" "evh_ns_pdnd_io_cosmos_fn" { resource_group_name = "${var.project}-evt-rg" } +data "azurerm_eventhub_authorization_rule" "evh_ns_pdnd_io_cosmos_service_preferences_fn" { + name = "io-fn-elt" + namespace_name = "${var.project}-evh-ns" + eventhub_name = "pdnd-io-cosmosdb-service-preferences" + resource_group_name = "${var.project}-evt-rg" +} + data "azurerm_eventhub_authorization_rule" "evh_ns_import_command_fn" { name = "io-fn-elt" namespace_name = "${var.project}-evh-ns" diff --git a/src/domains/elt/_modules/function_apps/function_app_elt.tf b/src/domains/elt/_modules/function_apps/function_app_elt.tf index 386f99cd7..68b76f8ad 100644 --- a/src/domains/elt/_modules/function_apps/function_app_elt.tf +++ b/src/domains/elt/_modules/function_apps/function_app_elt.tf @@ -45,6 +45,10 @@ locals { NOTIFICATION_STATUS_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_pdnd_io_cosmos_notification_status_fn.primary_connection_string NOTIFICATION_STATUS_LEASES_PREFIX = "notification-status-001" + SERVICE_PREFERENCES_TOPIC_NAME = "pdnd-io-cosmosdb-service-preferences" + SERVICE_PREFERENCES_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_pdnd_io_cosmos_service_preferences_fn.primary_connection_string + SERVICE_PREFERENCES_LEASES_PREFIX = "service-preferences-001" + ERROR_STORAGE_ACCOUNT = var.storage_account_name ERROR_STORAGE_KEY = var.storage_account_primary_access_key ERROR_STORAGE_TABLE = var.storage_account_tables.fnelterrors @@ -83,9 +87,10 @@ locals { MessageContentStorageConnection = data.azurerm_storage_account.storage_api_replica.primary_connection_string ServiceInfoBlobStorageConnection = data.azurerm_storage_account.storage_assets_cdn.primary_connection_string - MESSAGES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-messages-failure" - MESSAGE_STATUS_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-message-status-failure" - SERVICES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-services-failure" + MESSAGES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-messages-failure" + MESSAGE_STATUS_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-message-status-failure" + SERVICES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-services-failure" + SERVICE_PREFERENCES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-service-preferences-failure" INTERNAL_TEST_FISCAL_CODES = module.tests.test_users.all } @@ -120,15 +125,16 @@ module "function_elt" { app_settings = merge( local.function_elt.app_settings, { - "AzureWebJobs.CosmosApiServicesChangeFeed.Disabled" = "1" - "AzureWebJobs.CosmosApiMessageStatusChangeFeed.Disabled" = "1" - "AzureWebJobs.CosmosApiMessagesChangeFeed.Disabled" = "1" - "AzureWebJobs.AnalyticsMessagesChangeFeedInboundProcessorAdapter.Disabled" = "0" - "AzureWebJobs.AnalyticsMessagesStorageQueueInboundProcessorAdapter.Disabled" = "0" - "AzureWebJobs.AnalyticsMessageStatusChangeFeedInboundProcessorAdapter.Disabled" = "0" - "AzureWebJobs.AnalyticsMessageStatusStorageQueueInbloundAdapter.Disabled" = "0" - "AzureWebJobs.AnalyticsServiceChangeFeedInboundProcessorAdapter.Disabled" = "0" - "AzureWebJobs.AnalyticsServiceStorageQueueInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.CosmosApiServicesChangeFeed.Disabled" = "1" + "AzureWebJobs.CosmosApiMessageStatusChangeFeed.Disabled" = "1" + "AzureWebJobs.CosmosApiMessagesChangeFeed.Disabled" = "1" + "AzureWebJobs.AnalyticsMessagesChangeFeedInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsMessagesStorageQueueInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsMessageStatusChangeFeedInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsMessageStatusStorageQueueInbloundAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsServiceChangeFeedInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsServiceStorageQueueInboundProcessorAdapter.Disabled" = "0" + "AzureWebJobs.AnalyticsServicePreferencesChangeFeedInboundProcessorAdapter.Disabled" = "1" } ) @@ -153,7 +159,9 @@ module "function_elt" { local.function_elt.app_settings.MESSAGE_STATUS_FAILURE_QUEUE_NAME, "${local.function_elt.app_settings.MESSAGE_STATUS_FAILURE_QUEUE_NAME}-poison", local.function_elt.app_settings.SERVICES_FAILURE_QUEUE_NAME, - "${local.function_elt.app_settings.SERVICES_FAILURE_QUEUE_NAME}-poison" + "${local.function_elt.app_settings.SERVICES_FAILURE_QUEUE_NAME}-poison", + local.function_elt.app_settings.SERVICE_PREFERENCES_FAILURE_QUEUE_NAME, + "${local.function_elt.app_settings.SERVICE_PREFERENCES_FAILURE_QUEUE_NAME}-poison" ], "containers" = [], "blobs_retention_days" = 1,