-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.bicep
46 lines (39 loc) · 1.17 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
@description('Specify a DDoS protection plan name.')
param ddosProtectionPlanName string
@description('Specify a DDoS virtual network name.')
param virtualNetworkName string
@description('Specify a location for the resources.')
param location string = resourceGroup().location
@description('Specify the virtual network address prefix')
param vnetAddressPrefix string = '172.17.0.0/16'
@description('Specify the virtual network subnet prefix')
param subnetPrefix string = '172.17.0.0/24'
@description('Enable DDoS protection plan.')
param ddosProtectionPlanEnabled bool = true
resource ddosProtectionPlan 'Microsoft.Network/ddosProtectionPlans@2020-11-01' = {
name: ddosProtectionPlanName
location: location
}
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2020-11-01' = {
name: virtualNetworkName
location: location
properties: {
addressSpace: {
addressPrefixes: [
vnetAddressPrefix
]
}
subnets: [
{
name: 'default'
properties: {
addressPrefix: subnetPrefix
}
}
]
enableDdosProtection: ddosProtectionPlanEnabled
ddosProtectionPlan: {
id: ddosProtectionPlan.id
}
}
}