ALZ-Bicep
ALZ-Bicep copied to clipboard
hubNetworking: Make examples working with WhatIf mode
Overview/Summary
Solving multiple issues with WhatIf mode in Hub Networking.
This PR fixes/adds/changes/removes
Related to hub networking part of #249
However WhatIf test cannot be yet enabled to CI because Microsoft.Network/virtualNetworkGateways
does report that it would remove properties.remoteVirtualNetworkPeerings
and Microsoft.Network/virtualNetworks
reports that it would remove properties.virtualNetworkPeerings
both of those are just noise https://github.com/Azure/arm-template-whatif/issues/233
Breaking Changes
N/A
Testing Evidence
Not yet...
As part of this Pull Request I have
- [x] Read the Contribution Guide and ensured this PR is compliant with the guide
- [ ] Ensured the resource API versions in
.bicep
file/s I am adding/editing are using the latest API version possible - [x] Checked for duplicate Pull Requests
- [x] Associated it with relevant GitHub Issues
- [ ] (ALZ Bicep Core Team Only) Associated it with relevant ADO Items
- [ ] Ensured my code/branch is up-to-date with the latest changes in the
main
branch - [ ] Performed testing and provided evidence.
- [ ] Updated one or more of the following tests (if required)
- [ ] Updated relevant and associated documentation (e.g. Contribution Guide, Module READMEs, Wiki Docs etc.)
- [ ] If relevant, created or updated Code Tours here
Marked this one as draft for now because I didn't had time to re-run this in empty environment and collect evidences. And some of those changes might need discussion if I'm solving them correct way.
Also it might be that if #252 gets merged first there will be conflicts.
Looks that version of #252 which finally got merged didn't have conflicts with this one so I rebased it with main branch. However now there looks to be new PR #306 which touches same area.
@jtracey93 I can see that #306 was merged so I updated this one. Can you take first look if this something which can be included here? (assuming that it passes tests and readme is updated).
ping @jtracey93
Is this just laying around? There are multiple issues with hub-spoke peering reported here here that would be fixed by this PR @jtracey93
@Strandfelt as far I understand the challenge is that it is unclear inside of Microsoft that who/where those challenges should be fixed? Options are Azure API's, API clients like Bicep and actual client applications like this repository. And because this PR was not approved, I don't expect to see this solved anytime soon.
If we can find couple of persons who are interested enough about topic, it would be possible quite easily to build custom WhatIf tester which can handle those bugs in API. I once started to build that kind of in https://github.com/olljanat/alz-bicep-ci/blob/ps-whatif/PSAzureAPI/PSAzureAPI.psm1
Closing as stale