-
-
Save Merlus/f8d881ee5c6ff517dcd8dec075729296 to your computer and use it in GitHub Desktop.
ASG - Create Security Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$webRule = New-AzureRmNetworkSecurityRuleConfig ` | |
-Name "AllowHttps" ` | |
-Access Allow ` | |
-Protocol Tcp ` | |
-Direction outbound ` | |
-Priority 1500 ` | |
-SourceApplicationSecurityGroupId $webAsg.id ` | |
-SourcePortRange * ` | |
-DestinationAddressPrefix VirtualNetwork ` | |
-DestinationPortRange 443 | |
$sqlRule = New-AzureRmNetworkSecurityRuleConfig ` | |
-Name "AllowSql" ` | |
-Access Allow ` | |
-Protocol Tcp ` | |
-Direction outbound ` | |
-Priority 1000 ` | |
-SourceApplicationSecurityGroupId $sqlAsg.id ` | |
-SourcePortRange * ` | |
-DestinationAddressPrefix VirtualNetwork ` | |
-DestinationPortRange 1433 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment