Skip to content

Commit

Permalink
Merge pull request #1990 from visiativ-agora/visiativ/feat/allow-cust…
Browse files Browse the repository at this point in the history
…om-appinsightsagent-version

 Allows to use custom appinsights agent version
  • Loading branch information
arnaudlh authored Jul 1, 2024
2 parents f26b3ff + b728479 commit 9706af0
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 9706af0

Please sign in to comment.