generated from p1johnson/bicep-demo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazuredeploy.bicep
82 lines (75 loc) · 2.47 KB
/
azuredeploy.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
targetScope = 'subscription'
param location string = 'uksouth'
param resourceGroupName string = 'rg-demo-private-endpoint'
param virtualNetworkName string = 'vnet-demo-private-endpoint'
param virtualNetworkAddresses array = [
'10.0.0.0/16'
]
param virtualNetworkDnsServers array = []
param serverSubnetName string = 'default'
param serverSubnetAddress string = '10.0.1.0/24'
param bastionSubnetAddress string = '10.0.0.192/26'
param bastionName string = 'bas-private-endpoint-demo'
param windowsServerName string = 'pedemo'
param privateDnsZoneNames array = [
'privatelink.blob.${environment().suffixes.storage}'
'privatelink.table.${environment().suffixes.storage}'
'privatelink.queue.${environment().suffixes.storage}'
'privatelink.file.${environment().suffixes.storage}'
]
param storageAccountName string = 'stdemoendpoint'
param privateLinkGroupId string = 'file'
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}
module virtualNetwork 'modules/virtualNetwork/azuredeploy.bicep' = {
name: 'virtualNetwork'
scope: resourceGroup
params: {
location: location
virtualNetworkName: virtualNetworkName
virtualNetworkAddresses: virtualNetworkAddresses
virtualNetworkDnsServers: virtualNetworkDnsServers
serverSubnetName: serverSubnetName
serverSubnetAddress: serverSubnetAddress
bastionSubnetAddress: bastionSubnetAddress
}
}
module azureBastion 'modules/azureBastion/azuredeploy.bicep' = {
name: 'azureBastion'
scope: resourceGroup
params: {
location: location
bastionName: bastionName
bastionSubnetId: virtualNetwork.outputs.bastionSubnetId
}
}
module windowsServer 'modules/windowsServer/azuredeploy.bicep' = {
name: 'windowsServer'
scope: resourceGroup
params: {
location: location
serverName: windowsServerName
subnetId: virtualNetwork.outputs.serverSubnetId
}
}
module privateDnsZones 'modules/privateDnsZone/azuredeploy.bicep' = {
name: 'privateDnsZones'
scope: resourceGroup
params: {
zoneNames: privateDnsZoneNames
virtualNetworkId: virtualNetwork.outputs.virtualNetworkId
}
}
module storageAccount 'modules/storageAccount/azuredeploy.bicep' = {
name: 'storageAccount'
scope: resourceGroup
params: {
location: location
storageAccountName: storageAccountName
subnetId: virtualNetwork.outputs.serverSubnetId
privateLinkGroupId: privateLinkGroupId
privateDnsZoneId: privateDnsZones.outputs.privateDnsZoneIds[3]
}
}