forked from Ba4bes/AzDo-Bicep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.bicep
55 lines (50 loc) · 1.26 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
param resourcePrefix string
param virtualNetworkPrefix string
param currentDate string = utcNow('yyyy-MM-dd')
var subnetname = '${resourcePrefix}-sn'
var tagValues = {
CreatedBy: 'BICEPDeployment'
deploymentDate: currentDate
}
module sta 'Modules/storageAccount.bicep' = {
name: 'sta'
params: {
storageAccountPrefix: resourcePrefix
tagValues: tagValues
}
}
module nsg 'Modules/networkSecurityGroup.bicep' = {
name: 'nsg'
params: {
ResourcePrefix: resourcePrefix
tagValues: tagValues
securityRules: []
}
}
module vnet 'Modules/virtualNetwork.bicep' = {
name: 'vnet'
params: {
ResourcePrefix: resourcePrefix
virtualNetworkPrefix: virtualNetworkPrefix
tagValues: tagValues
subnets: [
{
name: subnetname
virtualNetworkPrefix: replace(virtualNetworkPrefix, '0.0/16', '1.0/24')
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Disabled'
nsg: nsg.outputs.nsgid
}
]
}
}
module privateEndPoint 'Modules/privateEndpoint.bicep' = {
name: 'privateEndPoint'
params: {
tagValues: tagValues
privateEndpointName: '${resourcePrefix}-pep'
storageAccountId: sta.outputs.staid
vnetId: vnet.outputs.vnetid
subnetName: subnetname
}
}