Share via

Unable to configure Network watcher flow log for Network security Group using Terraform

Satish B 110 Reputation points
2026-02-09T16:26:24.5366667+00:00

Hello Team,

we have Hub , Spoke & security Subscriptions. in Security Subscription already Log analytics Work space created. Need to save spoke subscription logs to Security Subscription. I have tried to create Network watcher flow log Spoke subscription Network security Groups. Its not allowing to create it. its only giving option for target resource id Like Vnet , Subnet & NIC. After created Network watcher flow logs for vnet & subnet its not updating any thing while using this Azure Cli Command.

az network watcher flow-log show --nsg <nsg name> --resource-group <rgname> --location<location>

Can some Pls suggest. How to fix this issue using terraform

Azure Network Watcher
Azure Network Watcher

An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.

0 comments No comments

Answer accepted by question author
  1. Praveen Bandaru 11,310 Reputation points Microsoft External Staff Moderator
    2026-02-09T17:15:26.54+00:00

    Hello Satish B

    I understand that you're having trouble setting up Network Watcher flow logs for a Network Security Group with Terraform.

    NSG Flow Logs have been deprecated for new deployments. Microsoft no longer supports creating new NSG Flow Logs, which is why the portal now only provides options to create flow logs at the VNet, Subnet, or NIC level rather than at the NSG level. Check the below screen shot:
    User's image

    Check the reference document for more understanding:

    Flow logging for network security groups

    Azure now requires the use of VNet Flow Logs, which operate at the VNet, Subnet, or NIC level and offer broader visibility. These logs can be fully centralized within your Security subscription.

    Virtual network flow logs


    Hope the above answer helps! Please let us know do you have any further queries.

    Please do consider to "accepting the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.