Skip to content

Commit

Permalink
Allows to use custom appinsights agent version
Browse files Browse the repository at this point in the history
  • Loading branch information
shanoor committed May 30, 2024
1 parent 96fdce1 commit b728479
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions modules/webapps/appservice/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ locals {

arm_filename = "${path.module}/arm_site_config.json"

app_settings = merge(try(var.app_settings, {}), try(local.dynamic_settings_to_process, {}), var.application_insight == null ? {} :
{
app_settings = merge(
var.application_insight == null ? {} : {
"APPINSIGHTS_INSTRUMENTATIONKEY" = var.application_insight.instrumentation_key,
"APPLICATIONINSIGHTS_CONNECTION_STRING" = var.application_insight.connection_string,
"ApplicationInsightsAgent_EXTENSION_VERSION" = "~2"
}
},
try(var.app_settings, {}),
try(local.dynamic_settings_to_process, {})
)

backup_storage_account = can(var.settings.backup) ? var.storage_accounts[try(var.settings.backup.lz_key, var.client_config.landingzone_key)][var.settings.backup.storage_account_key] : null
Expand Down
10 changes: 6 additions & 4 deletions modules/webapps/function_app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ locals {

arm_filename = "${path.module}/arm_site_config.json"

app_settings = merge(try(var.app_settings, {}), try(local.dynamic_settings_to_process, {}), var.application_insight == null ? {} :
{
app_settings = merge(
var.application_insight == null ? {} : {
"APPINSIGHTS_INSTRUMENTATIONKEY" = var.application_insight.instrumentation_key,
"APPLICATIONINSIGHTS_CONNECTION_STRING" = var.application_insight.connection_string,
"ApplicationInsightsAgent_EXTENSION_VERSION" = "~2"
}
},
try(var.app_settings, {}),
try(local.dynamic_settings_to_process, {})
)

}
}

0 comments on commit b728479

Please sign in to comment.