-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support delete option for NICs and Disks for VMs in Azure CLI #17846
Comments
hi @szimmerMicrosoft there's no concrete ETA on when 2021-03-01 Swagger will be avaiable, there's high risk to catch 5/25 timeline. Based on info I got from Adam, Swagger will be ready for review at week of 4/26. With it, I dont' think features in 2021-03-01 could catch 5/25 release. cc @qwordy. |
Hi @szimmerMicrosoft, it is only supported for |
disk deleteOption is currently only supported for vm, not for VMSS. We do have the ability to configure it for VMSS on NICs. We could support that now, or we could wait for deleteOption support for both disks and NICs to be possible on VMSS. Setting deleteOption on VMSS flex for NICs is probably a small minority choice so not a hard requirement now. |
Hi @szimmerMicrosoft One more thing to clarify is that for key=value format, the key is name or resource ID to use? Currently my design is if name is used for --nics, delete option has to be |
The only option for NICs parameter looking here
Appears to be resourceIds. vmName is used as the singular NIC name if nic_type == new. Using the name as resourceId if the user provides resource id makes sense. If the NIC being created is implicit I don't see any value in letting the user specify the VM name for the deleteOption, there is only one NIC, so let it just be deleteOption = X Let me know if I am misunderstanding how the create command works. |
We also could use existing nics and set deleteOption for them. Both name and resource id format are allowed for existing nics. If users provide name, we will format it to resource id: |
Oh great,so identifying those via name makes sense. However the user specifies the NICs, using that as the key I think is sensible. |
Resource Provider
CRP
Description of Feature or Work Requested
User experience:
In text:
az vm create
-n MyVm
-g MyResourceGroup
--public-ip-address-dns-name MyUniqueDnsName
--image ubuntults
--size Standard_DS2_v2
--generate-ssh-keys
--data-disk-sizes-gb 10 20
--data-disk-delete-option 0=Detach 1=Delete /*Use a singular value to apply on all data disks, or use = to configure the delete behavior for individual disks
--os-disk-delete-option Delete
--nic-delete-option = /*Use a singular value to apply on all nics, or use = to configure the delete behavior for individual NICs
The new switches do the following
--nic-delete-behavior configures the deleteOption field for the NIC created for the VM
vm.properties.networkProfile.networkInterfaces[0].properties.deleteOption = "Delete"
--os-disk-delete-option Delete configures delete option for the OS Disk
cstorageProfile.dataDisks[*].osDisk= "Delete"
--data-disk-delete-option configures the delete option for data disks as specified
vm.properties.storageProfile.dataDisks[*].deleteOption = "Delete"
Swagger PR containing the deleteOption for VM NICs: Azure/azure-rest-api-specs#13449
Swagger PR for disk deleteOption: Azure/azure-rest-api-specs#13657
Minimum API Version Required
2021-03-01
Swagger Link
Target Date
5/25
The text was updated successfully, but these errors were encountered: