-
Notifications
You must be signed in to change notification settings - Fork 81
Add flexible VNet and subnet deployment support #212
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
base: main
Are you sure you want to change the base?
Add flexible VNet and subnet deployment support #212
Conversation
- Support three scenarios: new VNet, existing VNet with new subnets, existing VNet with existing subnets - Add parameters: useExistingVnet, createSubnets, vnetAddressPrefix, subnet addresses - Add update_existing_subnets nested deployment for subnet delegation updates - Remove hardcoded resource group/subscription IDs - Remove CDN-related resources
6c82611 to
7311673
Compare
|
LGTM, but please add some testing evidence demonstrating the default flow and existing vnet/subnet flows. |
01b03e6 to
8e49e1a
Compare
Use reference() function to read existing subnet addressPrefix instead of omitting it. Remove unused useExistingPrivateDnsZone parameter and update documentation.
8e49e1a to
e089d3a
Compare
| "apiVersion": "[variables('resourceDeploymentApiVersion')]", | ||
| "condition": "[or(not(parameters('useExistingVnet')), parameters('createSubnets'))]", | ||
| "dependsOn": [ | ||
| "[resourceId('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should wait for the VNet to be created when provisioning new VNet resource i.e., useExistingVnet is false.
| }, | ||
| { | ||
| "type": "Microsoft.Resources/deployments", | ||
| "name": "subnet_Resources", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template might try to create the subnets in the Resource Group where the deployment is running. Can you verify this scenario: Use existing VNet from a different RG and create new subnet resources ?
siriande
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add all the validated test cases in the PR description?
This PR adds flexible VNet and subnet deployment support with three scenarios:
Changes