-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Allow empty parameters in subnet avm/res/network/virtual-network
#1772
fix: Allow empty parameters in subnet avm/res/network/virtual-network
#1772
Conversation
Important The "Needs: Triage 🔍" label must be removed once the triage process is complete! Tip For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation. Note This label was added as per ITA06. |
Note The "Type: AVM |
Hi @cloudchristoph , would you mind to add the !empty also for: privateEndpointNetworkPolicies and privateLinkServiceNetworkPolicies? To set the subnet within the vnet the same way we have inside the subnet module (
|
Sure. But for this parameter and the others you're already allowed to give an empty array or Correct me, if I'm wrong. I would like to ask one more question: |
Hey @elbatane, the PR looks good to me. Please also take a look :) |
…k` (Azure#1772) ## Description You cannot provide the following parameters in your subnet parameter, if they are empty: - networkSecurityGroup - natGateway - routeTable As soon as they are set, they have to have a correct resource id. This PR implements additional checks for given, but empty, parameters. I also added a new subnet definition in the `max` test to check for the correct behaviour. Fixes Azure#1681 Closes Azure#1681 ## Pipeline Reference | Pipeline | | -------- | | [![avm.res.network.virtual-network](https://github.com/cloudchristoph/bicep-registry-modules/actions/workflows/avm.res.network.virtual-network.yml/badge.svg?branch=1681_vnet_subnet_conditional_params)](https://github.com/cloudchristoph/bicep-registry-modules/actions/workflows/avm.res.network.virtual-network.yml) | ## Type of Change - [ ] Update to CI Environment or utilities (Non-module effecting 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`. - [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 day with the contribution guide at https://aka.ms/avm/contribute/bicep -->
Description
You cannot provide the following parameters in your subnet parameter, if they are empty:
As soon as they are set, they have to have a correct resource id.
This PR implements additional checks for given, but empty, parameters.
I also added a new subnet definition in the
max
test to check for the correct behaviour.Fixes #1681
Closes #1681
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.