Skip to content

Commit

Permalink
feat: Updated API version for `avm/res/network/application-gateway-we…
Browse files Browse the repository at this point in the history
…b-application-firewall-policy` (#3901)

## Description

Updated API version and added `jsChallengeCookieExpirationInMins` to
tests for validation

Closes #3891 

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.network.application-gateway-web-application-firewall-policy](https://github.com/anderseide/avm-bicep-registry-modules/actions/workflows/avm.res.network.application-gateway-web-application-firewall-policy.yml/badge.svg?branch=avm-res-network-application-gateway-web-application-firewall-policy)](https://github.com/anderseide/avm-bicep-registry-modules/actions/workflows/avm.res.network.application-gateway-web-application-firewall-policy.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [X] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [X] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [x] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [x] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Alexander Sehr <[email protected]>
Co-authored-by: JFolberth <[email protected]>
Co-authored-by: hundredacres <[email protected]>
Co-authored-by: Erika Gressi <[email protected]>
Co-authored-by: Pankaj Agrawal <[email protected]>
Co-authored-by: Buddy <[email protected]>
Co-authored-by: Guillaume Beaud <[email protected]>
Co-authored-by: Máté Barabás <[email protected]>
Co-authored-by: Julian Peißker <[email protected]>
  • Loading branch information
10 people authored Dec 20, 2024
1 parent b020243 commit 88224f5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This module deploys an Application Gateway Web Application Firewall (WAF) Policy

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-11-01/ApplicationGatewayWebApplicationFirewallPolicies) |
| `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` | [2024-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-03-01/ApplicationGatewayWebApplicationFirewallPolicies) |

## Usage examples

Expand Down Expand Up @@ -150,7 +150,10 @@ module applicationGatewayWebApplicationFirewallPolicy 'br/public:avm/res/network
// Non-required parameters
location: '<location>'
policySettings: {
customBlockResponseBody: 'PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=='
customBlockResponseStatusCode: 403
fileUploadLimitInMb: 10
jsChallengeCookieExpirationInMins: 60
mode: 'Prevention'
state: 'Enabled'
}
Expand Down Expand Up @@ -201,7 +204,10 @@ module applicationGatewayWebApplicationFirewallPolicy 'br/public:avm/res/network
},
"policySettings": {
"value": {
"customBlockResponseBody": "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg==",
"customBlockResponseStatusCode": 403,
"fileUploadLimitInMb": 10,
"jsChallengeCookieExpirationInMins": 60,
"mode": "Prevention",
"state": "Enabled"
}
Expand Down Expand Up @@ -246,7 +252,10 @@ param name = 'nagwafpmax001'
// Non-required parameters
param location = '<location>'
param policySettings = {
customBlockResponseBody: 'PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=='
customBlockResponseStatusCode: 403
fileUploadLimitInMb: 10
jsChallengeCookieExpirationInMins: 60
mode: 'Prevention'
state: 'Enabled'
}
Expand Down Expand Up @@ -292,6 +301,7 @@ module applicationGatewayWebApplicationFirewallPolicy 'br/public:avm/res/network
location: '<location>'
policySettings: {
fileUploadLimitInMb: 10
jsChallengeCookieExpirationInMins: 60
mode: 'Prevention'
state: 'Enabled'
}
Expand Down Expand Up @@ -342,6 +352,7 @@ module applicationGatewayWebApplicationFirewallPolicy 'br/public:avm/res/network
"policySettings": {
"value": {
"fileUploadLimitInMb": 10,
"jsChallengeCookieExpirationInMins": 60,
"mode": "Prevention",
"state": "Enabled"
}
Expand Down Expand Up @@ -386,6 +397,7 @@ param name = 'nagwafpwaf001'
param location = '<location>'
param policySettings = {
fileUploadLimitInMb: 10
jsChallengeCookieExpirationInMins: 60
mode: 'Prevention'
state: 'Enabled'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableT
}
}

resource applicationGatewayWAFPolicy 'Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies@2022-11-01' = {
resource applicationGatewayWAFPolicy 'Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies@2024-03-01' = {
name: name
location: location
tags: tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "9391039096512506977"
"version": "0.32.4.45862",
"templateHash": "10893386311526546547"
},
"name": "Application Gateway Web Application Firewall (WAF) Policies",
"description": "This module deploys an Application Gateway Web Application Firewall (WAF) Policy.",
Expand Down Expand Up @@ -84,7 +84,7 @@
},
"applicationGatewayWAFPolicy": {
"type": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies",
"apiVersion": "2022-11-01",
"apiVersion": "2024-03-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
Expand Down Expand Up @@ -122,7 +122,7 @@
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference('applicationGatewayWAFPolicy', '2022-11-01', 'full').location]"
"value": "[reference('applicationGatewayWAFPolicy', '2024-03-01', 'full').location]"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ module testDeployment '../../../main.bicep' = [
fileUploadLimitInMb: 10
state: 'Enabled'
mode: 'Prevention'
customBlockResponseBody: 'PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=='
customBlockResponseStatusCode: 403
jsChallengeCookieExpirationInMins: 60
}
managedRules: {
managedRuleSets: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module testDeployment '../../../main.bicep' = [
fileUploadLimitInMb: 10
state: 'Enabled'
mode: 'Prevention'
jsChallengeCookieExpirationInMins: 60
}
managedRules: {
managedRuleSets: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1",
"version": "0.2",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit 88224f5

Please sign in to comment.