Skip to content

Commit

Permalink
Remove default NSG rules for 22 and 3389 from Bicep deployment (#538)
Browse files Browse the repository at this point in the history
* Modify NSG in hub Resource Group #443

* GitHub Action: Build Bicep to JSON

Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
vidyambala and github-actions authored Nov 19, 2021
1 parent d2cafe3 commit 6b6e740
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 60 deletions.
31 changes: 1 addition & 30 deletions src/bicep/mlz.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -325,36 +325,7 @@ param hubSubnetAddressPrefix string = '10.0.100.128/27'
param hubVirtualNetworkDiagnosticsLogs array = []
param hubVirtualNetworkDiagnosticsMetrics array = []
param hubNetworkSecurityGroupName string = 'hub-nsg'
param hubNetworkSecurityGroupRules array = [
{
name: 'allow_ssh'
properties: {
description: 'Allow SSH access from anywhere'
access: 'Allow'
priority: 100
protocol: 'Tcp'
direction: 'Inbound'
sourcePortRange: '*'
sourceAddressPrefix: '*'
destinationPortRange: '22'
destinationAddressPrefix: '*'
}
}
{
name: 'allow_rdp'
properties: {
description: 'Allow RDP access from anywhere'
access: 'Allow'
priority: 200
protocol: 'Tcp'
direction: 'Inbound'
sourcePortRange: '*'
sourceAddressPrefix: '*'
destinationPortRange: '3389'
destinationAddressPrefix: '*'
}
}
]
param hubNetworkSecurityGroupRules array = []
param hubNetworkSecurityGroupDiagnosticsLogs array = [
{
category: 'NetworkSecurityGroupEvent'
Expand Down
31 changes: 1 addition & 30 deletions src/bicep/mlz.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,7 @@
},
"hubNetworkSecurityGroupRules": {
"type": "array",
"defaultValue": [
{
"name": "allow_ssh",
"properties": {
"description": "Allow SSH access from anywhere",
"access": "Allow",
"priority": 100,
"protocol": "Tcp",
"direction": "Inbound",
"sourcePortRange": "*",
"sourceAddressPrefix": "*",
"destinationPortRange": "22",
"destinationAddressPrefix": "*"
}
},
{
"name": "allow_rdp",
"properties": {
"description": "Allow RDP access from anywhere",
"access": "Allow",
"priority": 200,
"protocol": "Tcp",
"direction": "Inbound",
"sourcePortRange": "*",
"sourceAddressPrefix": "*",
"destinationPortRange": "3389",
"destinationAddressPrefix": "*"
}
}
]
"defaultValue": []
},
"hubNetworkSecurityGroupDiagnosticsLogs": {
"type": "array",
Expand Down

0 comments on commit 6b6e740

Please sign in to comment.