diff --git a/modules/azurerm/Application-Insights/application_insights.tf b/modules/azurerm/Application-Insights/application_insights.tf index 4d997a72..91f14d20 100644 --- a/modules/azurerm/Application-Insights/application_insights.tf +++ b/modules/azurerm/Application-Insights/application_insights.tf @@ -10,7 +10,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_application_insights" "application_insights" { - name = join("-", ["appi", var.application_insights_name]) + name = join("-", [var.application_insights_abbreviation, var.application_insights_name]) location = var.location resource_group_name = var.resource_group_name application_type = var.application_type @@ -18,5 +18,6 @@ resource "azurerm_application_insights" "application_insights" { daily_data_cap_notifications_disabled = var.daily_data_cap_notifications_disabled retention_in_days = var.retention_in_days disable_ip_masking = var.disable_ip_masking + workspace_id = var.workspace_id tags = var.tags } diff --git a/modules/azurerm/Application-Insights/variables.tf b/modules/azurerm/Application-Insights/variables.tf index 690cf972..02476bbe 100644 --- a/modules/azurerm/Application-Insights/variables.tf +++ b/modules/azurerm/Application-Insights/variables.tf @@ -9,6 +9,12 @@ # # -------------------------------------------------------------------------------------- +variable "application_insights_abbreviation" { + description = "Application Insights name abbreviation" + type = string + default = "appi" +} + variable "application_insights_name" { description = "Application Insights name" type = string @@ -55,3 +61,9 @@ variable "daily_data_cap_notifications_disabled" { description = "Disable daily data cap notifications" type = bool } + +variable "workspace_id" { + description = "Specifies the id of a log analytics workspace resource." + type = string + default = null +}