Skip to content

Commit

Permalink
made the parameters readable and fixed minor logic (Azure#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
husamhilal authored Mar 1, 2024
1 parent ec72db4 commit 1e6a171
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
23 changes: 21 additions & 2 deletions AVS-Landing-Zone/GreenField/Bicep/ESLZDeploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ param Location string = deployment().location

@description('The address space used for the AVS Private Cloud management networks. Must be a non-overlapping /22')
param PrivateCloudAddressSpace string

@description('The SKU that should be used for the first cluster, ensure you have quota for the given SKU before deploying')
@allowed([
'AV36'
Expand All @@ -19,38 +20,48 @@ param PrivateCloudAddressSpace string
'AV52'
])
param PrivateCloudSKU string = 'AV36P'

@description('Optional: Connectivity to Internet through Managed SNAT Service')
@allowed([
'Disabled'
'Enabled'
])
param Internet string = 'Disabled'

@description('The number of nodes to be deployed in the first/default cluster, ensure you have quota before deploying')
param PrivateCloudHostCount int = 3

@description('Optional: Assign Jumpbox VM as Contributor on AVS Private Cloud')
param AssignJumpboxAsAVSContributor bool = false

@description('Set this to true if you are redeploying, and the VNet already exists')
param VNetExists bool = false

@description('The address space used for the VNet attached to AVS. Must be non-overlapping with existing networks')
param VNetAddressSpace string

@description('The subnet CIDR used for the Gateway Subnet. Must be a /24 or greater within the VNetAddressSpace')
param VNetGatewaySubnet string

@description('Email addresses to be added to the alerting action group. Use the format ["[email protected]","[email protected]"].')
param AlertEmails array = []
@description('Should a Jumpbox & Bastion be deployed to access the Private Cloud')

@description('Should a Jumpbox & Bastion be deployed to access the Private Cloud')
param DeployJumpbox bool = false

@description('Username for the Jumpbox VM')
param JumpboxUsername string = 'avsjump'

@secure()
@description('Password for the Jumpbox VM, can be changed later')
param JumpboxPassword string = ''

@description('The subnet CIDR used for the Jumpbox VM Subnet. Must be a /26 or greater within the VNetAddressSpace')
param JumpboxSubnet string = ''

@description('The sku to use for the Jumpbox VM, must have quota for this within the target region')
param JumpboxSku string = 'Standard_D2s_v3'

@description('The OS Version for the Jumpbox VM. By default, it is Microsoft Windows Server 2012 Azure Edition with small disk for storage to reduce costs.')
@allowed([
'2016-Datacenter'
Expand All @@ -61,23 +72,31 @@ param JumpboxSku string = 'Standard_D2s_v3'
'2022-datacenter-azure-edition-smalldisk'
])
param OSVersion string = '2022-datacenter-azure-edition-smalldisk'

@description('Optional: Enable high performance attributes for VM, such as setting Storage to Premium and enabling Accelerated Networking')
param HighPerformance bool = true

@description('Should run a bootstrap PowerShell script on the Jumpbox VM or not')
param BootstrapJumpboxVM bool = false

@description('The path for Jumpbox VM bootstrap PowerShell script file (expecting "bootstrap.ps1" file)')
param BootstrapPath string = 'https://raw.githubusercontent.com/Azure/Enterprise-Scale-for-AVS/main/AVS-Landing-Zone/GreenField/Scripts/bootstrap.ps1'

@description('The command to trigger running the bootstrap script. If was not provided, then the expected script file name must be "bootstrap.ps1")')
param BootstrapCommand string = 'powershell.exe -ExecutionPolicy Unrestricted -File bootstrap.ps1'

@description('The subnet CIDR used for the Bastion Subnet. Must be a /26 or greater within the VNetAddressSpace')
param BastionSubnet string = ''

@description('Should HCX be deployed as part of the deployment')
param DeployHCX bool = true

@description('Should SRM be deployed as part of the deployment')
param DeploySRM bool = false

@description('License key to be used if SRM is deployed')
param SRMLicenseKey string = ''

@minValue(1)
@maxValue(10)
@description('Number of vSphere Replication Servers to be created if SRM is deployed')
Expand Down Expand Up @@ -158,7 +177,7 @@ module Jumpbox 'Modules/JumpBox.bicep' = if (DeployJumpbox) {
}
}

module JumpboxAVSContributor 'Modules/AVSRBAC.bicep' = if(AssignJumpboxAsAVSContributor) {
module JumpboxAVSContributor 'Modules/AVSRBAC.bicep' = if(DeployJumpbox && AssignJumpboxAsAVSContributor) {
name: '${deploymentPrefix}-Contributor-Assignment'
params: {
PrivateCloudName: AVSCore.outputs.PrivateCloudName
Expand Down
8 changes: 4 additions & 4 deletions AVS-Landing-Zone/GreenField/Bicep/ESLZDeploy.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
"contentVersion": "1.0.0.0",
"parameters": {
"Prefix": {
"value": "ESLZ"
"value": "LZA"
},
"PrivateCloudAddressSpace": {
"value": "10.0.0.0/22"
},
"PrivateCloudSKU": {
"value": "AV36P"
},
"Internet": {
"value": "Disabled"
},
"PrivateCloudHostCount": {
"value": 3
},
Expand Down Expand Up @@ -43,6 +40,9 @@
"OSVersion": {
"value": "2022-datacenter-azure-edition-smalldisk"
},
"AssignJumpboxAsAVSContributor": {
"value": false
},
"BootstrapJumpboxVM": {
"value": false
},
Expand Down
2 changes: 1 addition & 1 deletion AVS-Landing-Zone/GreenField/Scripts/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ function Install-Applications {
choco install powershell-core -y
choco install 7zip -y
choco install VMRC -y
choco install azure-cli -y

#Optional
#choco install vscode -y
#choco install azure-cli -y
#choco install microsoftazurestorageexplorer -y

}
Expand Down

0 comments on commit 1e6a171

Please sign in to comment.