github Azure/terraform-azurerm-avm-res-web-site v0.14.0

latest releases: v0.21.8, v0.21.7, v0.21.6...
16 months ago

BE AWARE - this version my introduce breaking changes to your existing configuration(s)

Breaking Change(s)

  • introducing feature that allows for different application insights for slots via Issue #145, involving changes to logic regarding the application insights for deployment slots

CODE:

Function App Slots

application_insights_connection_string = var.enable_application_insights ? (each.value.site_config.slot_application_insights_object_key != null ? coalesce(each.value.site_config.application_insights_connection_string, azurerm_application_insights.slot[each.value.site_config.slot_application_insights_object_key].connection_string, azurerm_application_insights.this[0].connection_string) : coalesce(each.value.site_config.application_insights_connection_string, azurerm_application_insights.this[0].connection_string)) : null

application_insights_key               = var.enable_application_insights ? (each.value.site_config.slot_application_insights_object_key != null ? coalesce(each.value.site_config.application_insights_key, azurerm_application_insights.slot[each.value.site_config.slot_application_insights_object_key].instrumentation_key, azurerm_application_insights.this[0].instrumentation_key) : coalesce(each.value.site_config.application_insights_key, azurerm_application_insights.this[0].instrumentation_key)) : null

Web App Slots

app_settings                                   = var.enable_application_insights ? merge({ "APPLICATIONINSIGHTS_CONNECTION_STRING" = (each.value.site_config.slot_application_insights_object_key != null ? coalesce(each.value.site_config.application_insights_connection_string, azurerm_application_insights.slot[each.value.site_config.slot_application_insights_object_key].connection_string, azurerm_application_insights.this[0].connection_string) : coalesce(each.value.site_config.application_insights_connection_string, azurerm_application_insights.this[0].connection_string)) }, { "APPINSIGHTS_INSTRUMENTATIONKEY" = (each.value.site_config.slot_application_insights_object_key != null ? coalesce(each.value.site_config.application_insights_key, azurerm_application_insights.slot[each.value.site_config.slot_application_insights_object_key].instrumentation_key, azurerm_application_insights.this[0].instrumentation_key) : coalesce(each.value.site_config.application_insights_key, azurerm_application_insights.this[0].instrumentation_key)) }, each.value.app_settings) : each.value.app_settings

Feature(s)

  • new slot_application_insights object variable
  • new slot_application_insights_object_key variable

Update(s)

  • addressed bug where dotnet_core_version was missing from application_stack (Issue #146)
  • added the following to documentation of deployment_slots variable:

If you plan to use the attribute reference of an external Application Insights instance for application_insights_connection_string and application_insights_key, you will likely need to remove the sensitivity level. For example, using the nonsensitive function.

  • updated example / deploy_slots_with_interfaces to show different application insights instance deployment model.

Don't miss a new terraform-azurerm-avm-res-web-site release

NewReleases is sending notifications on new releases.