我想为使用 Bicep 创建的网络安全组和存储帐户创建 NSG 流日志。
我正在部署一个像
resource nsg 'Microsoft.Network/networkSecurityGroups@2020-06-01' = {
name: networkSecurityGroupName
location: location
properties: {
securityRules: [
...
和像这样的存储帐户
resource stg 'Microsoft.Storage/storageAccounts@2021-01-01' = {
name: storageName
location: location
kind: 'StorageV2'
sku: {
name: 'Standard_LRS'
}
}
但是在添加和部署 NSG 流时
resource nsgFlowLogs 'Microsoft.Network/networkWatchers/flowLogs@2020-08-01' = {
name: 'NetworkWatcher_${location}/${nsgFlowName}'
location: location
properties: {
targetResourceId: nsg.Id
storageId: stg.Id
enabled: true
retentionPolicy: {
days: 2
enabled: true
}
format: {
type: 'JSON'
version: 2
}
}
}
我收到一个错误
| 19:02:20 - Error: Code=ResourceCountExceedsLimitDueToTemplate; Message=Subscription
| 853049fd-4889-45b6-aad9-f3f54421399c has a quota of 1 for resources of type NetworkWatcher with sku SkuNotSpecified.
| Subscription currently has 1 resources and the template contains 1 new resources of the this type which exceeds the
| quota. Please contact support to increase the quota for resource type NetworkWatcher