Giter Site home page Giter Site logo

Comments (9)

joshfree avatar joshfree commented on September 24, 2024

Thanks for filing this request, @jloisel. @weidongxu-microsoft could you help triage this

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 24, 2024

@XiaofeiCao Do we know whether network RP behave correctly on this (delete IP address when delete VM)?

We can have Hong try it.

from azure-sdk-for-java.

XiaofeiCao avatar XiaofeiCao commented on September 24, 2024

According to my knowledge, deleteOption is only effective on NetworkInterface's PublicIpAddress property, not PublicIpAddress or VirtualMachine itself.
@v-hongli1 Would you help try whether deleteOption works on PublicIpAddress?

from azure-sdk-for-java.

v-hongli1 avatar v-hongli1 commented on September 24, 2024

@XiaofeiCao

  1. I tried to fix the azure-resourcemanager-network interface and tested and found that deleteOption does not works on PublicIpAddress and does not return this item.
    The test result following as:
    PublicIPAccessTests.testCreateIPAccessWithDeleteOptionDelete.json
  2. Now the deleteOption is also not supported on Public IP Address in the portal.

from azure-sdk-for-java.

XiaofeiCao avatar XiaofeiCao commented on September 24, 2024

@v-hongli1 Got it. The deleteOption may not be visible in the PublicIpAddress's properties, but it may ACTUALLY take effect.
Would you help confirm whether this deleteOption takes effect when deleting the VM that it attaches to(though if I remembered correctly, it does not)?

from azure-sdk-for-java.

v-hongli1 avatar v-hongli1 commented on September 24, 2024

@XiaofeiCao
Regardless of whether .withPrimaryNetworkInterfaceDeleteOptions(DeleteOptions.DELETE) is loaded when the virtual machine is created, the Public IP Address is not removed when the virtual machine is removed. I think Public IP Address may not contain deleteOption in its properties.

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 24, 2024

@v-hongli1

It is in PublicIpAddress https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/PublicIpAddressInner.java#L497-L499

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?

image

If yes, check the resource create by Portal.

from azure-sdk-for-java.

weidongxu-microsoft avatar weidongxu-microsoft commented on September 24, 2024

@XiaofeiCao Do you aware any other option that may help user delete the IpAdress with the VM?

from azure-sdk-for-java.

XiaofeiCao avatar XiaofeiCao commented on September 24, 2024

My experience is that the PublicIpAddress deleteOption is in NetworkInterface resource.

There's also a potential backend bug: If PublicIpAddress deleteOption is not set when attached to NetworkInterface(whether using RP's API or deployment template), it'll always be null, regardless of future updates(luckily Databricks has set deleteOption in their create deployment template)...
Azure/azure-rest-api-specs#25475
Our SDK didn't set this property during PublicIpAddress attach, so even update won't work.

For above reason, I'm afraid for now we'll have to wait for the feature to be added.

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.