Skip to content

Commit

Permalink
Disable Async func to Profile (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnedMarshal authored Sep 30, 2024
1 parent 9e83f4c commit 178b692
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/domains/citizen-auth-app/07_function_fast_login.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions src/domains/citizen-auth-app/09_function_profile.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ locals {

#List of the functions'name to be disabled in both prod and slot
functions_disabled = [
"OnProfileUpdate"
"OnProfileUpdate",
"StoreSpidLogs",
"MigrateServicePreferenceFromLegacy"
]
}
}
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/domains/citizen-auth-app/09_function_profile_async.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
)

Expand All @@ -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"
]
)

Expand All @@ -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
Expand All @@ -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",
}
)

Expand Down

0 comments on commit 178b692

Please sign in to comment.