forked from timleyden/aib-vmss-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.bicep
39 lines (33 loc) · 1.23 KB
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@description('The location into which the Azure resources should be deployed.')
param location string = resourceGroup().location
@description('The username for the administrator account on the VMSS instances.')
param vmssAdministratorUsername string = 'sysadmin'
@secure()
@description('The password for the administrator account on the VMSS instances.')
param vmssAdministratorPassword string
module azureImageBuilder 'modules/aib.bicep' = {
name: 'azure-image-builder'
params: {
location: location
}
}
module azureImageBuilderRun 'modules/aib-run.bicep' = {
name: 'azure-image-builder-run'
params: {
location: location
azureImageBuilderName: azureImageBuilder.outputs.azureImageBuilderName
}
}
module vmss 'modules/vmss.bicep' = {
name: 'vm-scale-set'
dependsOn: [
azureImageBuilderRun // Ensure that the image is actually built before we try to use it in a VMSS.
]
params: {
location: location
vmssAdministratorUsername: vmssAdministratorUsername
vmssAdministratorPassword: vmssAdministratorPassword
vmssImageResourceId: azureImageBuilder.outputs.imageResourceId
}
}
output loadBalancerPublicIPAddressFqdn string = vmss.outputs.loadBalancerPublicIPAddressFqdn