Bug: Fix deployment toggle to hub-spoke by adding AzBastionEnabled boolean to resBastionSubnetRef #700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview/Summary
Was notified by @jamiepla1 of an issue dealing with
hubNetworking.parameters.all.json
file in theinfra-as-code\bicep\modules\hubNetworking\parameters\
directory when updatingparSubnets.value.name = AzureBastionSubnet
. Some customers might opt-out of keepingAzureBastionSubnet
ifparAzBastionEnabled = false
, removing it fromparSubnets
still gives you errors.The finding was the missing toggle located in
hubNetworking.bicep
file in theinfra-as-code/bicep/modules/hubNetworking
directory to update theresBastionSubnetRef
resource declaration.This PR fixes/adds/changes/removes
Adding
if (parAzBastionEnabled)
toinfra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
: Updated theresBastionSubnetRef
resource declaration. (hubNetworking.bicep: resBastionSubnetRef)Allows you to remove
AzureBastionSubnet
fromhubNetworking.parameters.all.json
file in theinfra-as-code\bicep\modules\hubNetworking\parameters\
directory when updatingparSubnets.value.name = AzureBastionSubnet
Breaking Changes
N/A
Testing Evidence
Before Fix
The deployment 'alz-Hub-and-SpokeDeploy-20231206T1512101164Z'
| failed with error(s). Showing 1 out of 1 error(s). Status Message:
| Resource
| /subscriptions/88888888-8888-8888-8888-888888888888/resourceGroups/rg-alz-connectivity/providers/Microsoft.Network/virtualNetworks/alz-hub-norwayeast/subnets/AzureBastionSubnet not found. (Code: NotFound)
After Fix
As part of this Pull Request I have
.bicep
file/s I am adding/editing are using the latest API version possiblemain
branch