Skip to content

Commit

Permalink
Merge branch 'main' into 725-custom-static-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
danycontre authored Dec 19, 2024
2 parents afebce8 + 3a3c577 commit bc8c11b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
27 changes: 13 additions & 14 deletions avm/1.0.0/res/network/virtual-network/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,23 @@ param enableTelemetry bool = true
// Dependencies //
// ============ //

resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' =
if (enableTelemetry) {
name: '46d3xbcp.res.network-virtualnetwork.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
outputs: {
telemetry: {
type: 'String'
value: 'For more information, see https://aka.ms/avm/TelemetryInfo'
}
resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) {
name: '46d3xbcp.res.network-virtualnetwork.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
outputs: {
telemetry: {
type: 'String'
value: 'For more information, see https://aka.ms/avm/TelemetryInfo'
}
}
}
}
}

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
name: name
Expand Down
16 changes: 8 additions & 8 deletions workload/bicep/modules/networking/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ param customStaticRoutes array = []
// Variable declaration //
// =========== //
var varAzureCloudName = environment().name
var varCreateAvdStaicRoute = true
var varCreateAvdStaticRoute = true
var varExistingAvdVnetSubId = !createVnet ? split(existingAvdSubnetResourceId, '/')[2] : ''
var varExistingAvdVnetSubRgName = !createVnet ? split(existingAvdSubnetResourceId, '/')[4] : ''
var varExistingAvdVnetName = !createVnet ? split(existingAvdSubnetResourceId, '/')[8] : ''
Expand Down Expand Up @@ -496,7 +496,7 @@ module routeTableAvd '../../../../avm/1.0.0/res/network/route-table/main.bicep'
name: avdRouteTableName
location: location
tags: tags
routes: varCreateAvdStaicRoute ? varStaticRoutes : []
routes: varCreateAvdStaticRoute ? varStaticRoutes : []
}
dependsOn: []
}
Expand Down Expand Up @@ -561,18 +561,18 @@ module virtualNetwork '../../../../avm/1.0.0/res/network/virtual-network/main.bi
addressPrefix: vnetAvdSubnetAddressPrefix
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Enabled'
networkSecurityGroupId: createVnet ? networksecurityGroupAvd.outputs.resourceId : ''
routeTableId: createVnet ? routeTableAvd.outputs.resourceId : ''
networkSecurityGroupResourceId: createVnet ? networksecurityGroupAvd.outputs.resourceId : ''
routeTableResourceId: createVnet ? routeTableAvd.outputs.resourceId : ''
}
{
name: vnetPrivateEndpointSubnetName
addressPrefix: vnetPrivateEndpointSubnetAddressPrefix
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Enabled'
networkSecurityGroupId: (createVnet && deployPrivateEndpointSubnet)
networkSecurityGroupResourceId: (createVnet && deployPrivateEndpointSubnet)
? networksecurityGroupPrivateEndpoint.outputs.resourceId
: ''
routeTableId: (createVnet && deployPrivateEndpointSubnet)
routeTableResourceId: (createVnet && deployPrivateEndpointSubnet)
? routeTablePrivateEndpoint.outputs.resourceId
: ''
}
Expand All @@ -583,8 +583,8 @@ module virtualNetwork '../../../../avm/1.0.0/res/network/virtual-network/main.bi
addressPrefix: vnetAvdSubnetAddressPrefix
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Enabled'
networkSecurityGroupId: createVnet ? networksecurityGroupAvd.outputs.resourceId : ''
routeTableId: createVnet ? routeTableAvd.outputs.resourceId : ''
networkSecurityGroupResourceId: createVnet ? networksecurityGroupAvd.outputs.resourceId : ''
routeTableResourceId: createVnet ? routeTableAvd.outputs.resourceId : ''
}
]
ddosProtectionPlanResourceId: deployDDoSNetworkProtection ? ddosProtectionPlan.outputs.resourceId : ''
Expand Down

0 comments on commit bc8c11b

Please sign in to comment.