Skip to content

Commit

Permalink
ignore_chnages for log_analytics_destination_type
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirkamara committed Feb 12, 2023
1 parent 06ec5a8 commit e68c9ec
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions core/terraform/airlock/airlock_processor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ resource "azurerm_monitor_diagnostic_setting" "airlock_function_app" {
days = 365
}
}

lifecycle { ignore_changes = [log_analytics_destination_type] }
}

resource "azurerm_private_endpoint" "function_storage" {
Expand Down
2 changes: 2 additions & 0 deletions core/terraform/api-webapp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,6 @@ resource "azurerm_monitor_diagnostic_setting" "webapp_api" {
days = 365
}
}

lifecycle { ignore_changes = [log_analytics_destination_type] }
}
3 changes: 2 additions & 1 deletion core/terraform/appgateway/appgateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ resource "azurerm_monitor_diagnostic_setting" "agw" {
name = "diagnostics-agw-${var.tre_id}"
target_resource_id = azurerm_application_gateway.agw.id
log_analytics_workspace_id = var.log_analytics_workspace_id
# log_analytics_destination_type = "Dedicated"

dynamic "enabled_log" {
for_each = ["ApplicationGatewayAccessLog", "ApplicationGatewayPerformanceLog", "ApplicationGatewayFirewallLog"]
Expand All @@ -221,6 +220,8 @@ resource "azurerm_monitor_diagnostic_setting" "agw" {
days = 365
}
}

lifecycle { ignore_changes = [log_analytics_destination_type] }
}


9 changes: 5 additions & 4 deletions core/terraform/keyvault.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ resource "azurerm_key_vault_secret" "application_admin_client_secret" {
}

resource "azurerm_monitor_diagnostic_setting" "kv" {
name = "diagnostics-kv-${var.tre_id}"
target_resource_id = azurerm_key_vault.kv.id
log_analytics_workspace_id = module.azure_monitor.log_analytics_workspace_id
log_analytics_destination_type = "AzureDiagnostics"
name = "diagnostics-kv-${var.tre_id}"
target_resource_id = azurerm_key_vault.kv.id
log_analytics_workspace_id = module.azure_monitor.log_analytics_workspace_id

dynamic "enabled_log" {
for_each = ["AuditEvent", "AzurePolicyEvaluationDetails"]
Expand All @@ -139,4 +138,6 @@ resource "azurerm_monitor_diagnostic_setting" "kv" {
days = 365
}
}

lifecycle { ignore_changes = [log_analytics_destination_type] }
}
3 changes: 2 additions & 1 deletion core/terraform/servicebus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ resource "azurerm_monitor_diagnostic_setting" "sb" {
name = "diagnostics-sb-${var.tre_id}"
target_resource_id = azurerm_servicebus_namespace.sb.id
log_analytics_workspace_id = module.azure_monitor.log_analytics_workspace_id
# log_analytics_destination_type = "Dedicated"

dynamic "enabled_log" {
for_each = ["OperationalLogs", "VNetAndIPFilteringLogs", "RuntimeAuditLogs", "ApplicationMetricsLogs"]
Expand All @@ -119,4 +118,6 @@ resource "azurerm_monitor_diagnostic_setting" "sb" {
days = 365
}
}

lifecycle { ignore_changes = [log_analytics_destination_type] }
}
2 changes: 1 addition & 1 deletion core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.4"
__version__ = "0.7.5"

0 comments on commit e68c9ec

Please sign in to comment.