Skip to content
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

Bug: Fix deployment toggle to hub-spoke by adding AzBastionEnabled boolean to resBastionSubnetRef #700

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

FallenHoot
Copy link
Contributor

Overview/Summary

Was notified by @jamiepla1 of an issue dealing with hubNetworking.parameters.all.json file in the infra-as-code\bicep\modules\hubNetworking\parameters\ directory when updating parSubnets.value.name = AzureBastionSubnet. Some customers might opt-out of keeping AzureBastionSubnet if parAzBastionEnabled = false, removing it from parSubnets still gives you errors.

The finding was the missing toggle located in hubNetworking.bicep file in the infra-as-code/bicep/modules/hubNetworking directory to update the resBastionSubnetRef resource declaration.

This PR fixes/adds/changes/removes

Adding if (parAzBastionEnabled) to infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep: Updated the resBastionSubnetRef resource declaration. (hubNetworking.bicep: resBastionSubnetRef)

Allows you to remove AzureBastionSubnet from hubNetworking.parameters.all.json file in the infra-as-code\bicep\modules\hubNetworking\parameters\ directory when updating parSubnets.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
image

As part of this Pull Request I have

@oZakari oZakari self-requested a review December 7, 2023 18:59
Copy link
Contributor

@oZakari oZakari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FallenHoot!

@oZakari oZakari merged commit 17edce4 into Azure:main Dec 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants