Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enabled support for
*
properties in UDTs (#1891)
## Description > Note: Required for #1257 Enabled support for `*` properties in UDTs ([ref](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/user-defined-data-types#:~:text=Decorators%20may%20be,10%20characters%20long.)) Used `>Any_other_property<` as a stand-in property name (as `*` seemed a bit unintuitive). We can change it to something else, but the Parameter name must be distinct enough & may not contain whitespaces. Tested for pattern module [Hub Networking](https://github.com/hundredacres/bicep-registry-modules/tree/hubspoke/avm/ptn/network/hub-networking) by @hundredacres Regenerated all docs for testing to ensure everything still works as intended. ## Tests ### Case 1: UDT is object ```bicep @description('Optional. A map of the hub virtual networks to create.') param hubVirtualNetworks hubVirtualNetworkObject type hubVirtualNetworkObject = { @description('Optional. Array of hub virtual networks to create.') *: hubVirtualNetworkType? }? ``` Result ![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/f72a53ea-1e1f-4794-adf6-557e8b71943f) ### Case 2: UDT is array ```bicep @description('Optional. Type test') param testObject testObjectType type testObjectType = { @description('Optional. Array of hub virtual networks to create.') *: hubVirtualNetworkType? }[]? ``` Result ![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/ac5c890d-bc76-448b-b9b8-9c627a2dd09b) ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.key-vault.vault](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml/badge.svg?branch=users%2Falsehr%2FreadmeScriptAstrixSupport&event=workflow_dispatch)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml) | ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] Update to CI Environment or utlities (Non-module effecting changes) - [ ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] 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 - [ ] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to day with the contribution guide at https://aka.ms/avm/contribute/bicep --> --------- Co-authored-by: Erika Gressi <[email protected]>
- Loading branch information