Skip to content

Commit

Permalink
fix: Removed flow log resource
Browse files Browse the repository at this point in the history
  • Loading branch information
13archit committed Jun 14, 2023
1 parent 87f4af9 commit 77dbe5e
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,9 @@ resource "azurerm_network_ddos_protection_plan" "example" {
tags = module.labels.tags
}

resource "azurerm_network_watcher" "test" {
resource "azurerm_network_watcher" "flow_log_nw" {
count = var.enable_network_watcher ? 1 : 0
name = format("%s-network_watcher", module.labels.id)
location = var.location
resource_group_name = var.resource_group_name
}


resource "azurerm_network_watcher_flow_log" "test" {
count = var.enable_flow_logs ? 1 : 0
network_watcher_name = join("", azurerm_network_watcher.test.*.name)
resource_group_name = var.resource_group_name
name = format("%s-flow_logs", module.labels.id)

network_security_group_id = var.network_security_group_id
storage_account_id = var.storage_account_id
enabled = true

retention_policy {
enabled = var.retention_policy_enabled
days = var.retention_policy_days
}

traffic_analytics {
enabled = var.enable_traffic_analytics
workspace_id = var.workspace_id
workspace_region = var.location
workspace_resource_id = var.workspace_resource_id
interval_in_minutes = 10
}
}
}

0 comments on commit 77dbe5e

Please sign in to comment.