Skip to content

Commit

Permalink
feat: Updating hubIPAddresses documentation (Azure#3880)
Browse files Browse the repository at this point in the history
## Description
Updated hubIPAddresses param to a UDT in order to provide additional
guidance on param formatting

Fixes Azure#3872 
Closes Azure#3872 

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.network.azure-firewall](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.network.azure-firewall.yml/badge.svg?branch=feat%2Fissues%2F3872)](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.network.azure-firewall.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:
- [X] 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.
- [ ] 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`.
  - [ ] 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 -->
  • Loading branch information
hundredacres authored Dec 20, 2024
1 parent 88224f5 commit 91bcdf9
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 6 deletions.
43 changes: 42 additions & 1 deletion avm/res/network/azure-firewall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,48 @@ IP addresses associated with AzureFirewall. Required if `virtualHubId` is suppli

- Required: No
- Type: object
- Default: `{}`

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`privateIPAddress`](#parameter-hubipaddressesprivateipaddress) | string | Private IP Address associated with AzureFirewall. |
| [`publicIPs`](#parameter-hubipaddressespublicips) | object | List of public IP addresses associated with AzureFirewall. |

### Parameter: `hubIPAddresses.privateIPAddress`

Private IP Address associated with AzureFirewall.

- Required: No
- Type: string

### Parameter: `hubIPAddresses.publicIPs`

List of public IP addresses associated with AzureFirewall.

- Required: No
- Type: object

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`addresses`](#parameter-hubipaddressespublicipsaddresses) | array | The list of Public IP addresses associated with AzureFirewall or IP addresses to be retained. |
| [`count`](#parameter-hubipaddressespublicipscount) | int | Public IP address count. |

### Parameter: `hubIPAddresses.publicIPs.addresses`

The list of Public IP addresses associated with AzureFirewall or IP addresses to be retained.

- Required: No
- Type: array

### Parameter: `hubIPAddresses.publicIPs.count`

Public IP address count.

- Required: No
- Type: int

### Parameter: `virtualHubId`

Expand Down
19 changes: 18 additions & 1 deletion avm/res/network/azure-firewall/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ param natRuleCollections natRuleCollectionType
param firewallPolicyId string = ''

@description('Conditional. IP addresses associated with AzureFirewall. Required if `virtualHubId` is supplied.')
param hubIPAddresses object = {}
param hubIPAddresses hubIPAddressesType?

@description('Conditional. The virtualHub resource ID to which the firewall belongs. Required if `virtualNetworkId` is empty.')
param virtualHubId string = ''
Expand Down Expand Up @@ -621,3 +621,20 @@ type networkRuleCollectionType = {
}[]
}
}[]?

type hubIPAddressesType = {
@description('Optional. Private IP Address associated with AzureFirewall.')
privateIPAddress: string?
@description('Optional. List of public IP addresses associated with AzureFirewall.')
publicIPs: {
@description('Optional. The list of Public IP addresses associated with AzureFirewall or IP addresses to be retained.')
addresses: [
{
@description('Optional. Public IP.')
address: string?
}
]?
@description('Optional. Public IP address count.')
count: int?
}?
}
58 changes: 54 additions & 4 deletions avm/res/network/azure-firewall/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.3.12046",
"templateHash": "7724811109136350489"
"version": "0.32.4.45862",
"templateHash": "212775860076150756"
},
"name": "Azure Firewalls",
"description": "This module deploys an Azure Firewall.",
Expand Down Expand Up @@ -664,6 +664,56 @@
}
},
"nullable": true
},
"hubIPAddressesType": {
"type": "object",
"properties": {
"privateIPAddress": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Private IP Address associated with AzureFirewall."
}
},
"publicIPs": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"prefixItems": [
{
"type": "object",
"properties": {
"address": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Public IP."
}
}
}
}
],
"items": false,
"nullable": true,
"metadata": {
"description": "Optional. The list of Public IP addresses associated with AzureFirewall or IP addresses to be retained."
}
},
"count": {
"type": "int",
"nullable": true,
"metadata": {
"description": "Optional. Public IP address count."
}
}
},
"nullable": true,
"metadata": {
"description": "Optional. List of public IP addresses associated with AzureFirewall."
}
}
}
}
},
"parameters": {
Expand Down Expand Up @@ -755,8 +805,8 @@
}
},
"hubIPAddresses": {
"type": "object",
"defaultValue": {},
"$ref": "#/definitions/hubIPAddressesType",
"nullable": true,
"metadata": {
"description": "Conditional. IP addresses associated with AzureFirewall. Required if `virtualHubId` is supplied."
}
Expand Down

0 comments on commit 91bcdf9

Please sign in to comment.