From 8e4da114f82f59c2a37e6df6f1343afc2d2a96f0 Mon Sep 17 00:00:00 2001 From: WickramBug Date: Wed, 15 May 2024 17:39:01 +0530 Subject: [PATCH 1/2] [main] Update name abbreviation for appi --- .../azurerm/Application-Insights/application_insights.tf | 2 +- modules/azurerm/Application-Insights/variables.tf | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/azurerm/Application-Insights/application_insights.tf b/modules/azurerm/Application-Insights/application_insights.tf index 4d997a72..d119bf3d 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 diff --git a/modules/azurerm/Application-Insights/variables.tf b/modules/azurerm/Application-Insights/variables.tf index 690cf972..5b531b08 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 From 6da0ebb5d35d2f3dc6a8523d12c129368b428e42 Mon Sep 17 00:00:00 2001 From: WickramBug Date: Wed, 15 May 2024 18:05:10 +0530 Subject: [PATCH 2/2] [dev] Parameterized LA configuration --- .../azurerm/Application-Insights/application_insights.tf | 1 + modules/azurerm/Application-Insights/variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/azurerm/Application-Insights/application_insights.tf b/modules/azurerm/Application-Insights/application_insights.tf index d119bf3d..91f14d20 100644 --- a/modules/azurerm/Application-Insights/application_insights.tf +++ b/modules/azurerm/Application-Insights/application_insights.tf @@ -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 5b531b08..02476bbe 100644 --- a/modules/azurerm/Application-Insights/variables.tf +++ b/modules/azurerm/Application-Insights/variables.tf @@ -61,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 +}