-
Notifications
You must be signed in to change notification settings - Fork 59
/
NATGW-NGW.bicep
39 lines (36 loc) · 996 Bytes
/
NATGW-NGW.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
param Deployment string
param DeploymentURI string
param NATGWInfo object
param Global object
#disable-next-line no-unused-params
param now string = utcNow('F')
param Prefix string
var PIPCount = contains(NATGWInfo, 'PIPCount') ? NATGWInfo.PIPCount : 1
var PIPs = [for (item, index) in range(0,PIPCount): {
PublicIP: 'Static'
}]
module PublicIP 'x.publicIP.bicep' = {
name: 'dp${Deployment}-NATGW-publicIPDeploy${NATGWInfo.Name}'
params: {
Deployment: Deployment
DeploymentURI: DeploymentURI
NICs: array(PIPs)
VM: NATGWInfo
PIPprefix: 'ngw'
Global: Global
Prefix: Prefix
}
}
resource NGW 'Microsoft.Network/natGateways@2022-11-01' = {
name: '${Deployment}-ngw${NATGWInfo.Name}'
location: resourceGroup().location
sku: {
name: 'Standard'
}
properties: {
// idleTimeoutInMinutes: int
publicIpAddresses: [for (item, index) in range(0,PIPCount): {
id: PublicIP.outputs.PIPID[item]
}]
}
}