@@ -108,16 +108,15 @@ function Test-AzureFirewallCRUD {
108
108
$natRule1TranslatedPort = " 91"
109
109
110
110
# AzureFirewallNatRule 2
111
- $natRule1Name = " natRule2"
112
- $natRule1Desc = " desc2"
113
- $natRule1SourceAddress1 = " 10.0.0.0"
114
- $natRule1SourceAddress2 = " 111.1.0.0/24"
115
- $natRule1DestinationAddress1 = " 1.2.3.4"
116
- $natRule1Protocol1 = " UDP"
117
- $natRule1Protocol2 = " TCP"
118
- $natRule1DestinationPort1 = " 95"
119
- $natRule1TranslatedFqdn = " server1.internal.com"
120
- $natRule1TranslatedPort = " 96"
111
+ $natRule2Name = " natRule2"
112
+ $natRule2Desc = " desc2"
113
+ $natRule2SourceAddress1 = " 10.0.0.0"
114
+ $natRule2SourceAddress2 = " 111.1.0.0/24"
115
+ $natRule2Protocol1 = " UDP"
116
+ $natRule2Protocol2 = " TCP"
117
+ $natRule2DestinationPort1 = " 95"
118
+ $natRule2TranslatedFqdn = " server1.internal.com"
119
+ $natRule2TranslatedPort = " 96"
121
120
122
121
try {
123
122
# Create the resource group
@@ -241,7 +240,7 @@ function Test-AzureFirewallCRUD {
241
240
$natRc = New-AzFirewallNatRuleCollection - Name $natRcName - Priority $natRcPriority - Rule $natRule
242
241
243
242
# Add second NAT Rule to rule Collection
244
- $natRc.AddRule ($$ natRule2)
243
+ $natRc.AddRule ($natRule2 )
245
244
246
245
# Add ApplicationRuleCollections to the Firewall using method AddApplicationRuleCollection
247
246
$azureFirewall.AddApplicationRuleCollection ($appRc )
@@ -450,8 +449,8 @@ function Test-AzureFirewallCRUD {
450
449
Assert-AreEqual $networkRule2SourceAddress1 $networkRule2.SourceAddresses [0 ]
451
450
Assert-AreEqual $networkRule2SourceAddress2 $networkRule2.SourceAddresses [1 ]
452
451
453
- Assert-AreEqual 1 $networkRule2.DestinationAddresses .Count
454
- Assert-AreEqual $networkRule2DestinationAddress1 $networkRule2.DestinationAddresses [0 ]
452
+ Assert-AreEqual 1 $networkRule2.DestinationFqdns .Count
453
+ Assert-AreEqual $networkRule2DestinationFqdn1 $networkRule2.DestinationFqdns [0 ]
455
454
456
455
Assert-AreEqual 3 $networkRule2.Protocols.Count
457
456
Assert-AreEqual $networkRule2Protocol1 $networkRule2.Protocols [0 ]
@@ -528,11 +527,6 @@ function Test-AzureFirewallCRUDWithZones {
528
527
$networkRcPriority = 200
529
528
$networkRcActionType = " Deny"
530
529
531
- # AzureFirewallNetworkRuleCollection2
532
- $networkRcName2 = " networkRc2"
533
- $networkRcPriority2 = 300
534
- $networkRcActionType = " Deny"
535
-
536
530
# AzureFirewallNetworkRule 1
537
531
$networkRule1Name = " networkRule"
538
532
$networkRule1Desc = " desc1"
@@ -560,18 +554,6 @@ function Test-AzureFirewallCRUDWithZones {
560
554
$natRule1TranslatedAddress = " 10.1.2.3"
561
555
$natRule1TranslatedPort = " 91"
562
556
563
- # AzureFirewallNatRule 2
564
- $natRule2Name = " natRule2"
565
- $natRule2Desc = " desc2"
566
- $natRule2SourceAddress1 = " 10.0.0.0"
567
- $natRule2SourceAddress2 = " 111.1.0.0/24"
568
- $natRule2DestinationAddress1 = " 1.2.3.4"
569
- $natRule2Protocol1 = " UDP"
570
- $natRule2Protocol2 = " TCP"
571
- $natRule2DestinationPort1 = " 9001"
572
- $natRule2TranslatedFqdn = " httpserver.internal.com"
573
- $natRule2TranslatedPort = " 9001"
574
-
575
557
try {
576
558
# Create the resource group
577
559
$resourceGroup = New-AzResourceGroup - Name $rgname - Location $location - Tags @ { testtag = " testval" }
0 commit comments