Skip to content

Commit 508a44f

Browse files
committed
fix deployment order and condition
Signed-off-by: galiacheng <[email protected]> Changes to be committed: modified: weblogic-azure-aks/src/main/bicep/mainTemplate.bicep
1 parent f443fec commit 508a44f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

weblogic-azure-aks/src/main/bicep/mainTemplate.bicep

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,15 @@ module queryStorageAccount 'modules/_deployment-scripts/_ds-query-storage-accoun
454454
}
455455

456456
// To void space overlap with AKS Vnet, must deploy the Applciation Gateway VNet before AKS deployment.
457-
module vnetForAppgatewayDeployment 'modules/_azure-resoruces/_vnetAppGateway.bicep' = if (enableAppGWIngress && (appGatewayCertificateOption != const_appGatewaySSLCertOptionHaveKeyVault)) {
457+
module vnetForAppgatewayDeployment 'modules/_azure-resoruces/_vnetAppGateway.bicep' = if (enableAppGWIngress) {
458458
name: 'vnet-application-gateway'
459459
params: {
460460
location: location
461461
vnetForApplicationGateway: vnetForApplicationGateway
462462
}
463+
dependsOn: [
464+
validateInputs
465+
]
463466
}
464467

465468
module wlsDomainDeployment 'modules/setupWebLogicCluster.bicep' = if (!enableCustomSSL) {
@@ -524,6 +527,7 @@ module wlsDomainDeployment 'modules/setupWebLogicCluster.bicep' = if (!enableCus
524527
dependsOn: [
525528
validateInputs
526529
queryStorageAccount
530+
vnetForAppgatewayDeployment
527531
]
528532
}
529533

@@ -589,6 +593,7 @@ module wlsDomainWithCustomSSLDeployment 'modules/setupWebLogicCluster.bicep' = i
589593
dependsOn: [
590594
wlsSSLCertSecretsDeployment
591595
queryStorageAccount
596+
vnetForAppgatewayDeployment
592597
]
593598
}
594599

@@ -641,7 +646,7 @@ module networkingDeployment 'modules/networking.bicep' = if (const_enableNetwork
641646
aksClusterName: ref_wlsDomainDeployment.outputs.aksClusterName.value
642647
appGatewayCertificateOption: appGatewayCertificateOption
643648
appGatewayPublicIPAddressName: appGatewayPublicIPAddressName
644-
appGatewaySubnetId: vnetForAppgatewayDeployment.outputs.subIdForApplicationGateway
649+
appGatewaySubnetId: enableAppGWIngress ? vnetForAppgatewayDeployment.outputs.subIdForApplicationGateway : ''
645650
appGatewaySubnetStartAddress:vnetForApplicationGateway.subnets.gatewaySubnet.startAddress
646651
appgwForAdminServer: appgwForAdminServer
647652
appgwForRemoteConsole: appgwForRemoteConsole

0 commit comments

Comments
 (0)