Hi Team,
Iam facing some errors while Enabling NSG Flow Log through Bicep. I have Two NSGResourceGroups with two different regions (NorthCentralUs, EastUs) where it consists of multiple Nsg's in each NSGResourceGroups, One Network Watcher for each region in NetworkWatcherRG, One Vnet and One storage account for each region.
In Bicep template, to collect the value of ExistingNsgId, NsgNames and NsgRgNames, i am using powershell script. When i try to deploy i am receiving the following error.
I am receiving this error only for 2nd NSG RG, but the first NSGRg does not have any problem for creating NSG flow log
Network security group specified in flow log TargetResourceId /subscriptions/xxx/resourceGroups/VSS_EASTUS_NSG/providers/Microsoft.Network/networkSecurityGroups/xxx is not found. (Code: NetworkSecurityGroupNotFoundForFlowLog)
Network security group specified in flow log TargetResourceId /subscriptions/xxx/resourceGroups/VSS_EASTUS_NSG/providers/Microsoft.Network/networkSecurityGroups/xxx is not found. (Code: NetworkSecurityGroupNotFoundForFlowLog)
Network security group specified in flow log TargetResourceId /subscriptions/xxx/resourceGroups/VSS_EASTUS_NSG/providers/Microsoft.Network/networkSecurityGroups/xxx is not found. (Code: NetworkSecurityGroupNotFoundForFlowLog)
Network security group specified in flow log TargetResourceId /subscriptions/xxx/resourceGroups/VSS_EASTUS_NSG/providers/Microsoft.Network/networkSecurityGroups/xxx is not found. (Code: NetworkSecurityGroupNotFoundForFlowLog)
Network security group specified in flow log TargetResourceId /subscriptions/xxx/resourceGroups/VSS_EASTUS_NSG/providers/Microsoft.Network/networkSecurityGroups/xxx is not found. (Code: NetworkSecurityGroupNotFoundForFlowLog)
Kindly help help me on this error.