Skip to content

Commit 25b3638

Browse files
venkatsvprmsJinLei
authored andcommitted
Adding support for ForceFirewallPolicy association on Application Gateway
1 parent 75f84d1 commit 25b3638

17 files changed

+28846
-30632
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
- 'New-AzVirtualHub'
4646
- 'Update-AzVirtualHub'
4747
* Removed Sql Management SDK dependency
48+
* Updated cmdlets to allow force firewallPolicy association
49+
- 'New-AzApplicationGateway'
4850

4951
#### Az.PolicyInsights
5052
* Improved error messages

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD.json

Lines changed: 4869 additions & 3402 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD2.json

Lines changed: 3218 additions & 2265 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD3.json

Lines changed: 1610 additions & 1521 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSet.json

Lines changed: 1401 additions & 4254 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSetWithConditions.json

Lines changed: 1754 additions & 2487 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDSubItems.json

Lines changed: 7239 additions & 8763 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDSubItems2.json

Lines changed: 3328 additions & 1848 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayWithFirewallPolicy.json

Lines changed: 1967 additions & 3531 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestAvailableServerVariableAndHeader.json

Lines changed: 91 additions & 91 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestAvailableSslOptions.json

Lines changed: 44 additions & 44 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestAvailableWafRuleSets.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"Entries": [
33
{
4-
"RequestUri": "/subscriptions/947d47b4-7883-4bb9-9d85-c5e8e2f572ce/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets?api-version=2020-03-01",
5-
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTQ3ZDQ3YjQtNzg4My00YmI5LTlkODUtYzVlOGUyZjU3MmNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9hcHBsaWNhdGlvbkdhdGV3YXlBdmFpbGFibGVXYWZSdWxlU2V0cz9hcGktdmVyc2lvbj0yMDIwLTAzLTAx",
4+
"RequestUri": "/subscriptions/45a81a6d-520b-4e1b-8355-5a4714332d26/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets?api-version=2020-03-01",
5+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDVhODFhNmQtNTIwYi00ZTFiLTgzNTUtNWE0NzE0MzMyZDI2L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9hcHBsaWNhdGlvbkdhdGV3YXlBdmFpbGFibGVXYWZSdWxlU2V0cz9hcGktdmVyc2lvbj0yMDIwLTAzLTAx",
66
"RequestMethod": "GET",
77
"RequestBody": "",
88
"RequestHeaders": {
99
"x-ms-client-request-id": [
10-
"8377edcd-8e88-4ec0-a7ef-b7b6b7297a8e"
10+
"22257e23-9cde-40b9-a01a-fca08934bd62"
1111
],
1212
"Accept-Language": [
1313
"en-US"
@@ -16,7 +16,7 @@
1616
"FxVersion/4.6.28516.03",
1717
"OSName/Windows",
1818
"OSVersion/Microsoft.Windows.10.0.18363.",
19-
"Microsoft.Azure.Management.Network.NetworkManagementClient/20.0.0.0"
19+
"Microsoft.Azure.Management.Network.NetworkManagementClient/19.19.10.0"
2020
]
2121
},
2222
"ResponseHeaders": {
@@ -27,13 +27,13 @@
2727
"no-cache"
2828
],
2929
"x-ms-request-id": [
30-
"f532aeca-3b6c-470b-8f11-2c83e9301961"
30+
"eb1de711-ffdd-46a7-8bc0-51f03e6f0e76"
3131
],
3232
"x-ms-correlation-request-id": [
33-
"c2d6678b-d987-4d44-b9e4-28c3218c4b0d"
33+
"b9a07ac7-d38e-4883-9451-f5a7aec32c98"
3434
],
3535
"x-ms-arm-service-request-id": [
36-
"bbfc69c0-8f84-41d7-875a-c88fea7aa8d7"
36+
"e3906f4a-231f-4a75-abb9-f070f6a7a724"
3737
],
3838
"Strict-Transport-Security": [
3939
"max-age=31536000; includeSubDomains"
@@ -46,13 +46,13 @@
4646
"11999"
4747
],
4848
"x-ms-routing-request-id": [
49-
"WESTEUROPE:20200405T092914Z:c2d6678b-d987-4d44-b9e4-28c3218c4b0d"
49+
"WESTUS:20200413T051056Z:b9a07ac7-d38e-4883-9451-f5a7aec32c98"
5050
],
5151
"X-Content-Type-Options": [
5252
"nosniff"
5353
],
5454
"Date": [
55-
"Sun, 05 Apr 2020 09:29:13 GMT"
55+
"Mon, 13 Apr 2020 05:10:55 GMT"
5656
],
5757
"Content-Length": [
5858
"94381"
@@ -70,6 +70,6 @@
7070
],
7171
"Names": {},
7272
"Variables": {
73-
"SubscriptionId": "947d47b4-7883-4bb9-9d85-c5e8e2f572ce"
73+
"SubscriptionId": "45a81a6d-520b-4e1b-8355-5a4714332d26"
7474
}
7575
}

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestTopLevelWafResourceWithApplicationGateway.json

Lines changed: 3268 additions & 2405 deletions
Large diffs are not rendered by default.

src/Network/Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
183183
HelpMessage = " Whether FIPS is enabled.")]
184184
public SwitchParameter EnableFIPS { get; set; }
185185

186+
[Parameter(
187+
Mandatory = false,
188+
HelpMessage = " Whether Force firewallPolicy association is enabled.")]
189+
public SwitchParameter ForceFirewallPolicyAssociation { get; set; }
190+
186191
[Parameter(
187192
Mandatory = false,
188193
HelpMessage = "A list of availability zones denoting where the application gateway needs to come from.")]
@@ -360,6 +365,11 @@ private PSApplicationGateway CreateApplicationGateway()
360365
applicationGateway.EnableFips = true;
361366
}
362367

368+
if (this.ForceFirewallPolicyAssociation.IsPresent)
369+
{
370+
applicationGateway.ForceFirewallPolicyAssociation = true;
371+
}
372+
363373
if (this.Zone != null)
364374
{
365375
applicationGateway.Zones = this.Zone?.ToList();

src/Network/Network/Models/PSApplicationGateway.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public class PSApplicationGateway : PSTopLevelResource
6969
[Ps1Xml(Target = ViewControl.Table)]
7070
public bool? EnableFips { get; set; }
7171

72+
[Ps1Xml(Target = ViewControl.Table)]
73+
public bool? ForceFirewallPolicyAssociation { get; set; }
74+
7275
public List<string> Zones { get; set; }
7376

7477
[Ps1Xml(Target = ViewControl.Table)]

src/Network/Network/help/Get-AzApplicationGateway.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ AutoscaleConfiguration :
4848
CustomErrorConfigurations : {}
4949
EnableHttp2 :
5050
EnableFips :
51+
ForceFirewallPolicyAssociation :
5152
Zones : {}
5253
OperationalState : Running
5354
ProvisioningState : Succeeded
@@ -105,6 +106,7 @@ AutoscaleConfiguration :
105106
CustomErrorConfigurations : {}
106107
EnableHttp2 :
107108
EnableFips :
109+
ForceFirewallPolicyAssociation :
108110
Zones : {}
109111
OperationalState : Running
110112
ProvisioningState : Succeeded
@@ -162,6 +164,7 @@ AutoscaleConfiguration :
162164
CustomErrorConfigurations : {}
163165
EnableHttp2 :
164166
EnableFips :
167+
ForceFirewallPolicyAssociation :
165168
Zones : {}
166169
OperationalState : Running
167170
ProvisioningState : Succeeded
@@ -219,6 +222,7 @@ AutoscaleConfiguration :
219222
CustomErrorConfigurations : {}
220223
EnableHttp2 :
221224
EnableFips :
225+
ForceFirewallPolicyAssociation :
222226
Zones : {}
223227
OperationalState : Running
224228
ProvisioningState : Succeeded

src/Network/Network/help/New-AzApplicationGateway.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <S
3131
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
3232
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
3333
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
34-
[-Zone <String[]>] [-Tag <Hashtable>] [-UserAssignedIdentityId <String>] [-Force] [-AsJob]
35-
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
36-
[-WhatIf] [-Confirm] [<CommonParameters>]
34+
[-ForceFirewallPolicyAssociation] [-Zone <String[]>] [-Tag <Hashtable>] [-UserAssignedIdentityId <String>]
35+
[-Force] [-AsJob] [-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
36+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3737
```
3838

3939
### SetByResourceId
@@ -54,9 +54,9 @@ New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <S
5454
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
5555
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
5656
[-FirewallPolicyId <String>] [-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>]
57-
[-EnableHttp2] [-EnableFIPS] [-Zone <String[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
58-
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
59-
[-WhatIf] [-Confirm] [<CommonParameters>]
57+
[-EnableHttp2] [-EnableFIPS] [-ForceFirewallPolicyAssociation] [-Zone <String[]>] [-Tag <Hashtable>] [-Force]
58+
[-AsJob] [-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
59+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
6060
```
6161

6262
### SetByResource
@@ -78,7 +78,7 @@ New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <S
7878
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
7979
[-FirewallPolicy <PSApplicationGatewayWebApplicationFirewallPolicy>]
8080
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
81-
[-Zone <String[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
81+
[-ForceFirewallPolicyAssociation] [-Zone <String[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
8282
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
8383
[-WhatIf] [-Confirm] [<CommonParameters>]
8484
```
@@ -101,9 +101,9 @@ New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <S
101101
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
102102
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
103103
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
104-
[-Zone <String[]>] [-Tag <Hashtable>] -Identity <PSManagedServiceIdentity> [-Force] [-AsJob]
105-
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
106-
[-WhatIf] [-Confirm] [<CommonParameters>]
104+
[-ForceFirewallPolicyAssociation] [-Zone <String[]>] [-Tag <Hashtable>] -Identity <PSManagedServiceIdentity>
105+
[-Force] [-AsJob] [-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
106+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
107107
```
108108

109109
## DESCRIPTION
@@ -368,6 +368,21 @@ Accept pipeline input: False
368368
Accept wildcard characters: False
369369
```
370370
371+
### -ForceFirewallPolicyAssociation
372+
Whether Force firewallPolicy association is enabled.
373+
374+
```yaml
375+
Type: System.Management.Automation.SwitchParameter
376+
Parameter Sets: (All)
377+
Aliases:
378+
379+
Required: False
380+
Position: Named
381+
Default value: None
382+
Accept pipeline input: False
383+
Accept wildcard characters: False
384+
```
385+
371386
### -FrontendIPConfigurations
372387
Specifies a list of front-end IP configurations for the application gateway.
373388
@@ -717,7 +732,7 @@ Accept wildcard characters: False
717732
```
718733
719734
### CommonParameters
720-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
735+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
721736
722737
## INPUTS
723738
@@ -761,6 +776,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
761776
762777
### System.Collections.Hashtable
763778
779+
### Microsoft.Azure.Commands.Network.Models.PSManagedServiceIdentity
780+
764781
## OUTPUTS
765782
766783
### Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

0 commit comments

Comments
 (0)