Azure API supports the HTTP methods PUT, GET, DELETE for the CRUD (Create/Retrieve/Update/Delete) operations on your resources. The PUT operation is used for both Create and Update. For existing resources, using a PUT with the existing resources preserves them and adds any new resources supplied in the JSON. If any of the existing resources are omitted from the JSON for the PUT operation, those resources are removed from the Azure deployment.
Based on customer support cases and feedback, we observed that this behavior causes problems for customers while performing updates to existing deployments. This is a challenge in the case of subnets in the VNet where any updates to the virtual network, or addition of resources (e.g. adding a routing table), to a virtual network require you to supply the entire virtual network configuration in addition to the subnets. To make it easier for customers, we have implemented a change in the PUT API behavior for virtual network updates. This change allows you to skip the subnet specification in a PUT call without deleting the existing subnets. This capability is now available with API version 2023-09-01.
The existing behavior has been to expect a subnet property in the PUT virtual network call. If a subnet property isn't included, the subnets are deleted. This might not be the intention.
Assuming your existing configuration is as follows:
"subnets": [ { "name": "SubnetA", "properties": {...} }, { "name": "SubnetB", "properties": {...} }, { "name": "SubnetC", "properties": {...} }, { "name": "SubnetD", "properties": {...} }
] |
The updated behavior is as follows:
"subnets": [] |
OR
"subnets": null |
"subnets": [ { "name": "SubnetA", "properties": {...} }, { "name": "Subnet-B", "properties": {...} }, { "name": "Subnet-X", "properties": {...} } ] |
In this case, the following changes are made to the virtual network:
This behavior remains unchanged from what Azure currently has today.
Test the new behavior in the regions listed above and share your feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.