Skip to content

Commit 2d6e64a

Browse files
fix: align VNet subnet deployment with deployAdminAccessResources condition
Agent-Logs-Url: https://github.com/microsoft/content-generation-solution-accelerator/sessions/2a9b47df-250c-4016-85ff-32e6f142f3c9 Co-authored-by: Rafi-Microsoft <207166450+Rafi-Microsoft@users.noreply.github.com>
1 parent b518ac8 commit 2d6e64a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,14 @@ module userAssignedIdentity 'br/public:avm/res/managed-identity/user-assigned-id
377377
}
378378

379379
// ========== Virtual Network and Networking Components ========== //
380+
var deployAdminAccessResources = enablePrivateNetworking && deployBastionAndJumpbox && !empty(vmAdminPassword)
380381
module virtualNetwork 'modules/virtualNetwork.bicep' = if (enablePrivateNetworking) {
381382
name: take('module.virtualNetwork.${solutionSuffix}', 64)
382383
params: {
383384
name: 'vnet-${solutionSuffix}'
384385
addressPrefixes: ['10.0.0.0/20'] // 4096 addresses (enough for 8 /23 subnets or 16 /24)
385386
location: solutionLocation
386-
deployBastionAndJumpbox: enablePrivateNetworking && deployBastionAndJumpbox
387+
deployBastionAndJumpbox: deployAdminAccessResources
387388
tags: tags
388389
logAnalyticsWorkspaceId: logAnalyticsWorkspaceResourceId
389390
resourceSuffix: solutionSuffix
@@ -405,7 +406,6 @@ var zoneSupportedJumpboxLocations = [
405406
'uksouth'
406407
'westus3'
407408
]
408-
var deployAdminAccessResources = enablePrivateNetworking && deployBastionAndJumpbox && !empty(vmAdminPassword)
409409
module bastionHost 'br/public:avm/res/network/bastion-host:0.8.2' = if (deployAdminAccessResources) {
410410
name: take('avm.res.network.bastion-host.${bastionHostName}', 64)
411411
params: {

0 commit comments

Comments
 (0)