From 43c002b31f162adaf890948023c4983417be8e1b Mon Sep 17 00:00:00 2001 From: Josiel Souza Date: Wed, 15 Apr 2026 16:29:02 +0100 Subject: [PATCH] feat(iac): DTOSS-12657 support disabling public access for app-insights Add internet_ingestion_enabled and internet_query_enabled variables to the Application Insights module to allow disabling public access when using Private Link. Both variables default to true to maintain backward compatibility. --- infrastructure/modules/app-insights/main.tf | 3 +++ infrastructure/modules/app-insights/variables.tf | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/infrastructure/modules/app-insights/main.tf b/infrastructure/modules/app-insights/main.tf index c605041c..754cbd3d 100644 --- a/infrastructure/modules/app-insights/main.tf +++ b/infrastructure/modules/app-insights/main.tf @@ -7,5 +7,8 @@ resource "azurerm_application_insights" "appins" { workspace_id = var.log_analytics_workspace_id application_type = var.appinsights_type + internet_ingestion_enabled = var.internet_ingestion_enabled + internet_query_enabled = var.internet_query_enabled + tags = var.tags } diff --git a/infrastructure/modules/app-insights/variables.tf b/infrastructure/modules/app-insights/variables.tf index 3d671f22..5a769c7d 100644 --- a/infrastructure/modules/app-insights/variables.tf +++ b/infrastructure/modules/app-insights/variables.tf @@ -57,6 +57,18 @@ variable "action_group_id" { default = null } +variable "internet_ingestion_enabled" { + type = bool + description = "Whether public internet ingestion is enabled for Application Insights." + default = true +} + +variable "internet_query_enabled" { + type = bool + description = "Whether public internet querying is enabled for Application Insights." + default = true +} + locals { alert_window_size = var.alert_frequency }