Skip to content

Commit

Permalink
update config based on applied values
Browse files Browse the repository at this point in the history
  • Loading branch information
gquadrati committed Oct 21, 2024
1 parent 11de75b commit b5f61ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/domains/elt/_modules/function_apps/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,22 @@ data "azurerm_eventhub_authorization_rule" "evh_ns_io_cosmos_profiles_fn" {
data "azurerm_eventhub_authorization_rule" "evh_ns_service_preferences_send_auth_rule" {
name = "io-fn-elt"
namespace_name = "${var.project}-itn-auth-elt-evhns-01"
eventhub_name = "pdnd-io-cosmosdb-service-preferences"
eventhub_name = "${var.project}-itn-auth-elt-service-preferences-01"
resource_group_name = "${var.project}-itn-auth-elt-rg-01"
}

data "azurerm_eventhub_authorization_rule" "evh_ns_profiles_send_auth_rule" {
name = "io-fn-elt"
namespace_name = "${var.project}-itn-auth-elt-evhns-01"
eventhub_name = "pdnd-io-cosmosdb-profiles"
eventhub_name = "${var.project}-itn-auth-elt-profiles-01"
resource_group_name = "${var.project}-itn-auth-elt-rg-01"
}


data "azurerm_eventhub_authorization_rule" "evh_ns_profile_deletion_send_auth_rule" {
name = "io-fn-elt"
namespace_name = "${var.project}-itn-auth-elt-evhns-01"
eventhub_name = "pdnd-io-cosmosdb-profile-deletion"
eventhub_name = "${var.project}-itn-auth-elt-profile-deletion-01"
resource_group_name = "${var.project}-itn-auth-elt-rg-01"
}

Expand Down
21 changes: 9 additions & 12 deletions src/domains/elt/_modules/function_apps/function_app_elt.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,19 @@ locals {
TARGETKAFKAAUTH_maxInFlightRequests = "1"
TARGETKAFKAAUTH_idempotent = "true"
TARGETKAFKAAUTH_transactionalId = "IO_ELT"
TARGETKAFKAAUTH_sasl_mechanism = "plain"
TARGETKAFKAAUTH_sasl_username = "$ConnectionString"
TARGETKAFKAAUTH_sasl_password = data.azurerm_eventhub_authorization_rule.evh_ns_service_preferences_send_auth_rule.primary_connection_string
TARGETKAFKAAUTH_topic = "pdnd-io-cosmosdb-service-preferences"
TARGETKAFKAAUTH_topic = "dummy" #Needed by KafkaProducerTopicConfig decoder

SERVICE_PREFERENCES_TOPIC_NAME = "pdnd-io-cosmosdb-service-preferences"
SERVICE_PREFERENCES_TOPIC_NAME = data.azurerm_eventhub_authorization_rule.evh_ns_profiles_send_auth_rule.eventhub_name
SERVICE_PREFERENCES_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_service_preferences_send_auth_rule.primary_connection_string
SERVICE_PREFERENCES_LEASES_PREFIX = "service-preferences-003"

PROFILES_TOPIC_NAME = "pdnd-io-cosmosdb-profiles"
PROFILES_TOPIC_NAME = data.azurerm_eventhub_authorization_rule.evh_ns_profiles_send_auth_rule.eventhub_name
PROFILES_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_profiles_send_auth_rule.primary_connection_string
PROFILES_LEASES_PREFIX = "profiles-003"

PROFILE_DELETION_TOPIC_NAME = "pdnd-io-cosmosdb-profile-deletion"
PROFILE_DELETION_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_profile_deletion_send_auth_rule.primary_connection_string
PROFILE_DELETION_LEASES_PREFIX = "profile-deletion-001"
DELETES_TOPIC_NAME = data.azurerm_eventhub_authorization_rule.evh_ns_profile_deletion_send_auth_rule.eventhub_name
DELETES_TOPIC_CONNECTION_STRING = data.azurerm_eventhub_authorization_rule.evh_ns_profile_deletion_send_auth_rule.primary_connection_string
DELETES_LEASES_PREFIX = "profile-deletion-001"


ERROR_STORAGE_ACCOUNT = var.storage_account_name
Expand Down Expand Up @@ -114,7 +111,7 @@ locals {
SERVICES_FAILURE_QUEUE_NAME = "pdnd-io-cosmosdb-services-failure"
SERVICE_PREFERENCES_FAILURE_QUEUE_NAME = local.service_preferences_failure_queue_name
PROFILES_FAILURE_QUEUE_NAME = local.profiles_failure_queue_name
PROFILE_DELETION_FAILURE_QUEUE_NAME = local.profile_deletion_failure_queue_name
DELETES_FAILURE_QUEUE_NAME = local.profile_deletion_failure_queue_name

# PDV integration env variables
PDV_TOKENIZER_API_KEY = data.azurerm_key_vault_secret.pdv_tokenizer_api_key.value,
Expand Down Expand Up @@ -152,7 +149,7 @@ module "function_elt" {
app_service_plan_info = {
kind = "elastic"
sku_tier = "ElasticPremium"
sku_size = "EP1"
sku_size = "EP2"
maximum_elastic_worker_count = 1
worker_count = null
zone_balancing_enabled = null
Expand All @@ -171,7 +168,7 @@ module "function_elt" {
"AzureWebJobs.AnalyticsServiceStorageQueueInboundProcessorAdapter.Disabled" = "0"
"AzureWebJobs.AnalyticsServicePreferencesChangeFeedInboundProcessorAdapter.Disabled" = "1"
"AzureWebJobs.AnalyticsProfilesChangeFeedInboundProcessorAdapter.Disabled" = "1"
"AzureWebJobs.AnalyticsDeletesChangeFeedInboundProcessorAdapter.Disabled" = "1"
"AzureWebJobs.AnalyticsUserDataProcessingChangeFeedInboundProcessorAdapter.Disabled" = "1"
}
)

Expand Down

0 comments on commit b5f61ba

Please sign in to comment.