From 178b692bba5467d4904179e42157f628a34a928b Mon Sep 17 00:00:00 2001 From: Daniele Manni Date: Mon, 30 Sep 2024 14:38:59 +0200 Subject: [PATCH] Disable Async func to Profile (#1207) --- .../citizen-auth-app/07_function_fast_login.tf | 2 -- .../citizen-auth-app/09_function_profile.tf | 11 ++++------- .../09_function_profile_async.tf | 16 ++++++++-------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/domains/citizen-auth-app/07_function_fast_login.tf b/src/domains/citizen-auth-app/07_function_fast_login.tf index cd5f53fdc..b50797eb2 100644 --- a/src/domains/citizen-auth-app/07_function_fast_login.tf +++ b/src/domains/citizen-auth-app/07_function_fast_login.tf @@ -190,8 +190,6 @@ module "function_fast_login_staging_slot_itn" { app_service_plan_id = module.function_fast_login_itn.app_service_plan_id health_check_path = "/info" - enable_function_app_public_network_access = false - storage_account_name = module.function_fast_login_itn.storage_account.name storage_account_access_key = module.function_fast_login_itn.storage_account.primary_access_key internal_storage_connection_string = module.function_fast_login_itn.storage_account_internal_function.primary_connection_string diff --git a/src/domains/citizen-auth-app/09_function_profile.tf b/src/domains/citizen-auth-app/09_function_profile.tf index 6cee4f262..fa24abfbe 100644 --- a/src/domains/citizen-auth-app/09_function_profile.tf +++ b/src/domains/citizen-auth-app/09_function_profile.tf @@ -148,7 +148,9 @@ locals { #List of the functions'name to be disabled in both prod and slot functions_disabled = [ - "OnProfileUpdate" + "OnProfileUpdate", + "StoreSpidLogs", + "MigrateServicePreferenceFromLegacy" ] } } @@ -209,10 +211,7 @@ module "function_profile" { subnet_id = module.fn_profile_snet[count.index].id - sticky_app_setting_names = concat([ - "AzureWebJobs.HandleNHNotificationCall.Disabled", - "AzureWebJobs.StoreSpidLogs.Disabled" - ], + sticky_app_setting_names = concat( [ for to_disable in local.function_profile.functions_disabled : format("AzureWebJobs.%s.Disabled", to_disable) @@ -233,8 +232,6 @@ module "function_profile_staging_slot" { app_service_plan_id = module.function_profile[count.index].app_service_plan_id health_check_path = "/api/v1/info" - enable_function_app_public_network_access = false - storage_account_name = module.function_profile[count.index].storage_account.name storage_account_access_key = module.function_profile[count.index].storage_account.primary_access_key internal_storage_connection_string = module.function_profile[count.index].storage_account_internal_function.primary_connection_string diff --git a/src/domains/citizen-auth-app/09_function_profile_async.tf b/src/domains/citizen-auth-app/09_function_profile_async.tf index f92e28215..333ed0cd4 100644 --- a/src/domains/citizen-auth-app/09_function_profile_async.tf +++ b/src/domains/citizen-auth-app/09_function_profile_async.tf @@ -42,8 +42,9 @@ module "function_profile_async" { app_settings = merge( local.function_profile_async.app_settings_common, { - "AzureWebJobs.StoreSpidLogs.Disabled" = "0", - "AzureWebJobs.OnProfileUpdate.Disabled" = "0", + "AzureWebJobs.MigrateServicePreferenceFromLegacy.Disabled" = "1", + "AzureWebJobs.StoreSpidLogs.Disabled" = "1", + "AzureWebJobs.OnProfileUpdate.Disabled" = "1", } ) @@ -61,9 +62,9 @@ module "function_profile_async" { subnet_id = module.fn_profile_async_snet.id sticky_app_setting_names = concat([ - "AzureWebJobs.HandleNHNotificationCall.Disabled", "AzureWebJobs.StoreSpidLogs.Disabled", - "AzureWebJobs.OnProfileUpdate.Disabled" + "AzureWebJobs.OnProfileUpdate.Disabled", + "AzureWebJobs.MigrateServicePreferenceFromLegacy.Disabled" ] ) @@ -80,8 +81,6 @@ module "function_profile_async_staging_slot" { app_service_plan_id = module.function_profile_async.app_service_plan_id health_check_path = "/api/v1/info" - enable_function_app_public_network_access = false - storage_account_name = module.function_profile_async.storage_account.name storage_account_access_key = module.function_profile_async.storage_account.primary_access_key internal_storage_connection_string = module.function_profile_async.storage_account_internal_function.primary_connection_string @@ -93,8 +92,9 @@ module "function_profile_async_staging_slot" { app_settings = merge( local.function_profile_async.app_settings_common, { - "AzureWebJobs.StoreSpidLogs.Disabled" = "1", - "AzureWebJobs.OnProfileUpdate.Disabled" = "1", + "AzureWebJobs.MigrateServicePreferenceFromLegacy.Disabled" = "1", + "AzureWebJobs.StoreSpidLogs.Disabled" = "1", + "AzureWebJobs.OnProfileUpdate.Disabled" = "1", } )