-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[FEATURE REQ] DeleteOptions on Public Ip Address #38806
Comments
Thanks for filing this request, @jloisel. @weidongxu-microsoft could you help triage this |
@XiaofeiCao Do we know whether network RP behave correctly on this (delete IP address when delete VM)? We can have Hong try it. |
According to my knowledge, deleteOption is only effective on |
|
@v-hongli1 Got it. The deleteOption may not be visible in the |
@XiaofeiCao |
It is in But if it does not have effect, then it may not be supported yet (or have bug in backend). Could you try this on portal and see if this deletes IpAddress when delete VM? If yes, check the resource create by Portal. |
@XiaofeiCao Do you aware any other option that may help user delete the IpAdress with the VM? |
My experience is that the PublicIpAddress deleteOption is in There's also a potential backend bug: If For above reason, I'm afraid for now we'll have to wait for the feature to be added. |
@jloisel Due to service implementation limitation, the deleteOption should be set on the NetworkInterface that the PublicIpAddress is attached to. // create nic with PublicIpAddress delete option
NetworkInterface nic = networkManager.networkInterfaces()
.define(generateRandomResourceName("nic-", 15))
.xx()
.withNewPrimaryPublicIPAddress()
.withPrimaryPublicIPAddressDeleteOptions(DeleteOptions.DELETE) // set primary publicIpAddress deleteOptions
.create();
// update delete option
nic.update()
.withPrimaryPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
.apply(); |
Hi @jloisel. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @jloisel, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
It's currently not possible to set DeleteOptions on a public ip address through the SDK, when creating it:
Would be useful to have it (as disk / network interfaces on a VM), to allow deleting the public ip automatically when the vm is deleted. As of now, we need to do this manually which is cumbersome.
The text was updated successfully, but these errors were encountered: