Skip to content

Commit 23d5609

Browse files
committed
Added comments for network policies setting
1 parent a15e914 commit 23d5609

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

infra/samples/network-subnet-design.bicep

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ param subnets subnetType[] = [
8282
{
8383
name: 'peps'
8484
addressPrefixes: ['10.0.0.0/23'] // /23 (10.0.0.0 - 10.0.1.255), 512 addresses
85-
privateEndpointNetworkPolicies: 'Disabled'
86-
privateLinkServiceNetworkPolicies: 'Disabled'
85+
privateEndpointNetworkPolicies: 'Disabled' // 'Disabled': to use private endpoints in the subnet.
86+
privateLinkServiceNetworkPolicies: 'Disabled' // 'Disabled': to deploy a private link service in the subnet.
8787
networkSecurityGroup: {
8888
name: 'peps-nsg'
8989
securityRules: []
@@ -92,8 +92,8 @@ param subnets subnetType[] = [
9292
{
9393
name: 'web'
9494
addressPrefixes: ['10.0.2.0/23'] // /23 (10.0.2.0 - 10.0.3.255), 512 addresses
95-
privateEndpointNetworkPolicies: 'Disabled'
96-
privateLinkServiceNetworkPolicies: 'Disabled'
95+
privateEndpointNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
96+
privateLinkServiceNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
9797
networkSecurityGroup: {
9898
name: 'web-nsg'
9999
securityRules: [
@@ -122,8 +122,8 @@ param subnets subnetType[] = [
122122
{
123123
name: 'app'
124124
addressPrefixes: ['10.0.4.0/23'] // /23 (10.0.4.0 - 10.0.5.255), 512 addresses
125-
privateEndpointNetworkPolicies: 'Disabled'
126-
privateLinkServiceNetworkPolicies: 'Disabled'
125+
privateEndpointNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
126+
privateLinkServiceNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
127127
networkSecurityGroup: {
128128
name: 'app-nsg'
129129
securityRules: [
@@ -152,8 +152,8 @@ param subnets subnetType[] = [
152152
{
153153
name: 'ai'
154154
addressPrefixes: ['10.0.6.0/23'] // /23 (10.0.6.0 - 10.0.7.255), 512 addresses
155-
privateEndpointNetworkPolicies: 'Disabled'
156-
privateLinkServiceNetworkPolicies: 'Disabled'
155+
privateEndpointNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
156+
privateLinkServiceNetworkPolicies: 'Enabled' // 'Disabled' only if you need to support private endpoints or private link services in the subnet.
157157
networkSecurityGroup: {
158158
name: 'ai-nsg'
159159
securityRules: [
@@ -180,8 +180,8 @@ param subnets subnetType[] = [
180180
{
181181
name: 'data'
182182
addressPrefixes: ['10.0.8.0/23'] // /23 (10.0.8.0 - 10.0.9.255), 512 addresses
183-
privateEndpointNetworkPolicies: 'Disabled'
184-
privateLinkServiceNetworkPolicies: 'Disabled'
183+
privateEndpointNetworkPolicies: 'Disabled' // 'Disabled': to use private endpoints in the subnet.
184+
privateLinkServiceNetworkPolicies: 'Disabled' // 'Disabled': to deploy a private link service in the subnet.
185185
networkSecurityGroup: {
186186
name: 'data-nsg'
187187
securityRules: [
@@ -246,8 +246,10 @@ module network '../modules/network/main.bicep' = {
246246
output vnetName string = network.outputs.vnetName
247247
output vnetResourceId string = network.outputs.vnetResourceId
248248

249-
output subnetWebResourceId string = first(filter(network.outputs.subnets, s => s.name == 'web')).?resourceId ?? ''
250249
output subnetPrivateEndpointsResourceId string = first(filter(network.outputs.subnets, s => s.name == 'peps')).?resourceId ?? ''
250+
251+
252+
output subnetWebResourceId string = first(filter(network.outputs.subnets, s => s.name == 'web')).?resourceId ?? ''
251253
output subnetAppResourceId string = first(filter(network.outputs.subnets, s => s.name == 'app')).?resourceId ?? ''
252254
output subnetAiResourceId string = first(filter(network.outputs.subnets, s => s.name == 'ai')).?resourceId ?? ''
253255
output subnetDataResourceId string = first(filter(network.outputs.subnets, s => s.name == 'data')).?resourceId ?? ''

0 commit comments

Comments
 (0)