Skip to content

Commit aabd124

Browse files
krbaryffok
authored andcommitted
feat: Align public IP module params with 2025-01-01 API types (Azure#6368)
## Description Parameters `ipTags`, `dnsSettings`, and `ddosSettings` now use resource input types from the `Microsoft.Network/publicIPAddresses@2025-01-01` API version instead of custom-defined types. #Resolves Azure#6358 ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.network.public-ip-address](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.network.public-ip-address.yml/badge.svg?branch=users%2Fkrbar%2FpipTypes)](https://github.com/krbar/bicep-registry-modules/actions/workflows/avm.res.network.public-ip-address.yml) | ## Type of Change <!-- Use the checkboxes [x] on the options that are relevant. --> - Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [x] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation - [ ] Update to CI Environment or utilities (Non-module affecting changes) ## 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 - [x] I have updated the module's CHANGELOG.md file with an entry for the next version <!-- Please keep up to date with the contribution guide at https://aka.ms/avm/contribute/bicep -->
1 parent 2c4ecdb commit aabd124

File tree

5 files changed

+32
-265
lines changed

5 files changed

+32
-265
lines changed

avm/res/network/public-ip-address/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
The latest version of the changelog can be found [here](https://github.com/Azure/bicep-registry-modules/blob/main/avm/res/network/public-ip-address/CHANGELOG.md).
44

5+
## 0.11.0
6+
7+
### Changes
8+
9+
- Replaced custom types for `ipTags`, `dnsSettings` and `ddosSettings` with direct references to the resource input types from the `Microsoft.Network/publicIPAddresses@2025-01-01` API version.
10+
11+
### Breaking Changes
12+
13+
- Parameters `ipTags`, `dnsSettings`, and `ddosSettings` now use resource input types from the `Microsoft.Network/publicIPAddresses@2025-01-01` API version instead of custom-defined types.
14+
515
## 0.10.0
616

717
### Changes

avm/res/network/public-ip-address/README.md

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -663,51 +663,6 @@ The DDoS protection plan configuration associated with the public IP address.
663663
- Required: No
664664
- Type: object
665665

666-
**Required parameters**
667-
668-
| Parameter | Type | Description |
669-
| :-- | :-- | :-- |
670-
| [`protectionMode`](#parameter-ddossettingsprotectionmode) | string | The DDoS protection policy customizations. |
671-
672-
**Optional parameters**
673-
674-
| Parameter | Type | Description |
675-
| :-- | :-- | :-- |
676-
| [`ddosProtectionPlan`](#parameter-ddossettingsddosprotectionplan) | object | The DDoS protection plan associated with the public IP address. |
677-
678-
### Parameter: `ddosSettings.protectionMode`
679-
680-
The DDoS protection policy customizations.
681-
682-
- Required: Yes
683-
- Type: string
684-
- Allowed:
685-
```Bicep
686-
[
687-
'Enabled'
688-
]
689-
```
690-
691-
### Parameter: `ddosSettings.ddosProtectionPlan`
692-
693-
The DDoS protection plan associated with the public IP address.
694-
695-
- Required: No
696-
- Type: object
697-
698-
**Required parameters**
699-
700-
| Parameter | Type | Description |
701-
| :-- | :-- | :-- |
702-
| [`id`](#parameter-ddossettingsddosprotectionplanid) | string | The resource ID of the DDOS protection plan associated with the public IP address. |
703-
704-
### Parameter: `ddosSettings.ddosProtectionPlan.id`
705-
706-
The resource ID of the DDOS protection plan associated with the public IP address.
707-
708-
- Required: Yes
709-
- Type: string
710-
711666
### Parameter: `deleteOption`
712667

713668
The delete option for the public IP address.
@@ -875,57 +830,6 @@ The DNS settings of the public IP address.
875830
- Required: No
876831
- Type: object
877832

878-
**Required parameters**
879-
880-
| Parameter | Type | Description |
881-
| :-- | :-- | :-- |
882-
| [`domainNameLabel`](#parameter-dnssettingsdomainnamelabel) | string | The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. |
883-
884-
**Optional parameters**
885-
886-
| Parameter | Type | Description |
887-
| :-- | :-- | :-- |
888-
| [`domainNameLabelScope`](#parameter-dnssettingsdomainnamelabelscope) | string | The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. |
889-
| [`fqdn`](#parameter-dnssettingsfqdn) | string | The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. |
890-
| [`reverseFqdn`](#parameter-dnssettingsreversefqdn) | string | The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. |
891-
892-
### Parameter: `dnsSettings.domainNameLabel`
893-
894-
The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
895-
896-
- Required: Yes
897-
- Type: string
898-
899-
### Parameter: `dnsSettings.domainNameLabelScope`
900-
901-
The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN.
902-
903-
- Required: No
904-
- Type: string
905-
- Allowed:
906-
```Bicep
907-
[
908-
'NoReuse'
909-
'ResourceGroupReuse'
910-
'SubscriptionReuse'
911-
'TenantReuse'
912-
]
913-
```
914-
915-
### Parameter: `dnsSettings.fqdn`
916-
917-
The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
918-
919-
- Required: No
920-
- Type: string
921-
922-
### Parameter: `dnsSettings.reverseFqdn`
923-
924-
The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
925-
926-
- Required: No
927-
- Type: string
928-
929833
### Parameter: `enableTelemetry`
930834

931835
Enable/Disable usage telemetry for module.
@@ -949,27 +853,6 @@ The list of tags associated with the public IP address.
949853
- Required: No
950854
- Type: array
951855

952-
**Required parameters**
953-
954-
| Parameter | Type | Description |
955-
| :-- | :-- | :-- |
956-
| [`ipTagType`](#parameter-iptagsiptagtype) | string | The IP tag type. |
957-
| [`tag`](#parameter-iptagstag) | string | The IP tag. |
958-
959-
### Parameter: `ipTags.ipTagType`
960-
961-
The IP tag type.
962-
963-
- Required: Yes
964-
- Type: string
965-
966-
### Parameter: `ipTags.tag`
967-
968-
The IP tag.
969-
970-
- Required: Yes
971-
- Type: string
972-
973856
### Parameter: `location`
974857

975858
Location for all resources.

avm/res/network/public-ip-address/main.bicep

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ param availabilityZones int[] = [
3434
param publicIPAddressVersion string = 'IPv4'
3535

3636
@description('Optional. The DNS settings of the public IP address.')
37-
param dnsSettings dnsSettingsType?
37+
param dnsSettings resourceInput<'Microsoft.Network/publicIPAddresses@2025-01-01'>.properties.dnsSettings?
3838

3939
@description('Optional. The list of tags associated with the public IP address.')
40-
param ipTags ipTagType[]?
40+
param ipTags resourceInput<'Microsoft.Network/publicIPAddresses@2025-01-01'>.properties.ipTags?
4141

4242
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.6.1'
4343
@description('Optional. The lock settings of the service.')
@@ -58,7 +58,7 @@ param skuName string = 'Standard'
5858
param skuTier string = 'Regional'
5959

6060
@description('Optional. The DDoS protection plan configuration associated with the public IP address.')
61-
param ddosSettings ddosSettingsType?
61+
param ddosSettings resourceInput<'Microsoft.Network/publicIPAddresses@2025-01-01'>.properties.ddosSettings?
6262

6363
@description('Optional. The delete option for the public IP address.')
6464
@allowed([
@@ -246,42 +246,3 @@ output ipAddress string = publicIpAddress.properties.?ipAddress ?? ''
246246

247247
@description('The location the resource was deployed into.')
248248
output location string = publicIpAddress.location
249-
250-
// ================ //
251-
// Definitions //
252-
// ================ //
253-
254-
@export()
255-
type dnsSettingsType = {
256-
@description('Required. The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.')
257-
domainNameLabel: string
258-
259-
@description('Optional. The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN.')
260-
domainNameLabelScope: ('NoReuse' | 'ResourceGroupReuse' | 'SubscriptionReuse' | 'TenantReuse')?
261-
262-
@description('Optional. The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.')
263-
fqdn: string?
264-
265-
@description('Optional. The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.')
266-
reverseFqdn: string?
267-
}
268-
269-
@export()
270-
type ddosSettingsType = {
271-
@description('Optional. The DDoS protection plan associated with the public IP address.')
272-
ddosProtectionPlan: {
273-
@description('Required. The resource ID of the DDOS protection plan associated with the public IP address.')
274-
id: string
275-
}?
276-
@description('Required. The DDoS protection policy customizations.')
277-
protectionMode: 'Enabled'
278-
}
279-
280-
@export()
281-
type ipTagType = {
282-
@description('Required. The IP tag type.')
283-
ipTagType: string
284-
285-
@description('Required. The IP tag.')
286-
tag: string
287-
}

avm/res/network/public-ip-address/main.json

Lines changed: 18 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -6,105 +6,12 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.39.26.7824",
9-
"templateHash": "2127232527712631807"
9+
"templateHash": "4769782033235146336"
1010
},
1111
"name": "Public IP Addresses",
1212
"description": "This module deploys a Public IP Address."
1313
},
1414
"definitions": {
15-
"dnsSettingsType": {
16-
"type": "object",
17-
"properties": {
18-
"domainNameLabel": {
19-
"type": "string",
20-
"metadata": {
21-
"description": "Required. The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system."
22-
}
23-
},
24-
"domainNameLabelScope": {
25-
"type": "string",
26-
"allowedValues": [
27-
"NoReuse",
28-
"ResourceGroupReuse",
29-
"SubscriptionReuse",
30-
"TenantReuse"
31-
],
32-
"nullable": true,
33-
"metadata": {
34-
"description": "Optional. The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN."
35-
}
36-
},
37-
"fqdn": {
38-
"type": "string",
39-
"nullable": true,
40-
"metadata": {
41-
"description": "Optional. The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone."
42-
}
43-
},
44-
"reverseFqdn": {
45-
"type": "string",
46-
"nullable": true,
47-
"metadata": {
48-
"description": "Optional. The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN."
49-
}
50-
}
51-
},
52-
"metadata": {
53-
"__bicep_export!": true
54-
}
55-
},
56-
"ddosSettingsType": {
57-
"type": "object",
58-
"properties": {
59-
"ddosProtectionPlan": {
60-
"type": "object",
61-
"properties": {
62-
"id": {
63-
"type": "string",
64-
"metadata": {
65-
"description": "Required. The resource ID of the DDOS protection plan associated with the public IP address."
66-
}
67-
}
68-
},
69-
"nullable": true,
70-
"metadata": {
71-
"description": "Optional. The DDoS protection plan associated with the public IP address."
72-
}
73-
},
74-
"protectionMode": {
75-
"type": "string",
76-
"allowedValues": [
77-
"Enabled"
78-
],
79-
"metadata": {
80-
"description": "Required. The DDoS protection policy customizations."
81-
}
82-
}
83-
},
84-
"metadata": {
85-
"__bicep_export!": true
86-
}
87-
},
88-
"ipTagType": {
89-
"type": "object",
90-
"properties": {
91-
"ipTagType": {
92-
"type": "string",
93-
"metadata": {
94-
"description": "Required. The IP tag type."
95-
}
96-
},
97-
"tag": {
98-
"type": "string",
99-
"metadata": {
100-
"description": "Required. The IP tag."
101-
}
102-
}
103-
},
104-
"metadata": {
105-
"__bicep_export!": true
106-
}
107-
},
10815
"diagnosticSettingFullType": {
10916
"type": "object",
11017
"properties": {
@@ -396,21 +303,24 @@
396303
}
397304
},
398305
"dnsSettings": {
399-
"$ref": "#/definitions/dnsSettingsType",
400-
"nullable": true,
306+
"type": "object",
401307
"metadata": {
308+
"__bicep_resource_derived_type!": {
309+
"source": "Microsoft.Network/publicIPAddresses@2025-01-01#properties/properties/properties/dnsSettings"
310+
},
402311
"description": "Optional. The DNS settings of the public IP address."
403-
}
312+
},
313+
"nullable": true
404314
},
405315
"ipTags": {
406316
"type": "array",
407-
"items": {
408-
"$ref": "#/definitions/ipTagType"
409-
},
410-
"nullable": true,
411317
"metadata": {
318+
"__bicep_resource_derived_type!": {
319+
"source": "Microsoft.Network/publicIPAddresses@2025-01-01#properties/properties/properties/ipTags"
320+
},
412321
"description": "Optional. The list of tags associated with the public IP address."
413-
}
322+
},
323+
"nullable": true
414324
},
415325
"lock": {
416326
"$ref": "#/definitions/lockType",
@@ -442,11 +352,14 @@
442352
}
443353
},
444354
"ddosSettings": {
445-
"$ref": "#/definitions/ddosSettingsType",
446-
"nullable": true,
355+
"type": "object",
447356
"metadata": {
357+
"__bicep_resource_derived_type!": {
358+
"source": "Microsoft.Network/publicIPAddresses@2025-01-01#properties/properties/properties/ddosSettings"
359+
},
448360
"description": "Optional. The DDoS protection plan configuration associated with the public IP address."
449-
}
361+
},
362+
"nullable": true
450363
},
451364
"deleteOption": {
452365
"type": "string",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
3-
"version": "0.10"
3+
"version": "0.11"
44
}

0 commit comments

Comments
 (0)