Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
routeTableName: 'dep-<<namePrefix>>-rt-${serviceShort}'
networkSecurityGroupName: 'dep-<<namePrefix>>-nsg-${serviceShort}'
managedIdentityName: 'dep-ses-msi-${serviceShort}'
routeTableName: 'dep-ses-rt-${serviceShort}'
networkSecurityGroupName: 'dep-ses-nsg-${serviceShort}'
}
}

Expand All @@ -43,10 +43,10 @@ module diagnosticDependencies '../../../../.shared/dependencyConstructs/diagnost
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
params: {
storageAccountName: 'dep<<namePrefix>>diasa${serviceShort}01'
logAnalyticsWorkspaceName: 'dep-<<namePrefix>>-law-${serviceShort}'
eventHubNamespaceEventHubName: 'dep-<<namePrefix>>-evh-${serviceShort}'
eventHubNamespaceName: 'dep-<<namePrefix>>-evhns-${serviceShort}'
storageAccountName: 'depsesdiasa${serviceShort}01'
logAnalyticsWorkspaceName: 'dep-ses-law-${serviceShort}'
eventHubNamespaceEventHubName: 'dep-ses-evh-${serviceShort}'
eventHubNamespaceName: 'dep-ses-evhns-${serviceShort}'
location: location
}
}
Expand All @@ -60,7 +60,7 @@ module testDeployment '../../deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '<<namePrefix>>${serviceShort}001'
name: 'ses${serviceShort}001'
addressPrefixes: [
'10.0.0.0/16'
]
Expand Down Expand Up @@ -90,7 +90,7 @@ module testDeployment '../../deploy.bicep' = {
}
{
addressPrefix: '10.0.0.0/24'
name: '<<namePrefix>>-az-subnet-x-001'
name: 'ses-az-subnet-x-001'
networkSecurityGroupId: resourceGroupResources.outputs.networkSecurityGroupResourceId
roleAssignments: [
{
Expand Down Expand Up @@ -121,11 +121,11 @@ module testDeployment '../../deploy.bicep' = {
}
}
]
name: '<<namePrefix>>-az-subnet-x-002'
name: 'ses-az-subnet-x-002'
}
{
addressPrefix: '10.0.6.0/24'
name: '<<namePrefix>>-az-subnet-x-003'
name: 'ses-az-subnet-x-003'
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Enabled'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module testDeployment '../../deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '<<namePrefix>>${serviceShort}001'
name: 'ses${serviceShort}001'
addressPrefixes: [
'10.0.0.0/16'
]
Expand Down
20 changes: 17 additions & 3 deletions modules/Microsoft.Network/virtualNetworks/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ param tags object = {}
@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
param enableDefaultTelemetry bool = true

@description('Optional. The name of logs that will be streamed.')
@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource.')
@allowed([
'allLogs'
'VMProtectionAlerts'
])
param diagnosticLogCategoriesToEnable array = [
'VMProtectionAlerts'
'allLogs'
]

@description('Optional. The name of metrics that will be streamed.')
Expand All @@ -72,7 +73,7 @@ param diagnosticMetricsToEnable array = [
@description('Optional. The name of the diagnostic setting, if deployed.')
param diagnosticSettingsName string = '${name}-diagnosticSettings'

var diagnosticsLogs = [for category in diagnosticLogCategoriesToEnable: {
var diagnosticsLogsSpecified = [for category in filter(diagnosticLogCategoriesToEnable, item => item != 'allLogs'): {
category: category
enabled: true
retentionPolicy: {
Expand All @@ -81,6 +82,17 @@ var diagnosticsLogs = [for category in diagnosticLogCategoriesToEnable: {
}
}]

var diagnosticsLogs = contains(diagnosticLogCategoriesToEnable, 'allLogs') ? [
{
categoryGroup: 'allLogs'
enabled: true
retentionPolicy: {
enabled: true
days: diagnosticLogsRetentionInDays
}
}
] : diagnosticsLogsSpecified

var diagnosticsMetrics = [for metric in diagnosticMetricsToEnable: {
category: metric
timeGrain: null
Expand Down Expand Up @@ -265,3 +277,5 @@ output subnetResourceIds array = [for subnet in subnets: az.resourceId('Microsof

@description('The location the resource was deployed into.')
output location string = virtualNetwork.location

output diagnosticsLogs array = diagnosticsLogs