Azure / azure-libraries-for-java

Azure Management Libraries for Java
https://docs.microsoft.com/en-us/java/azure/
MIT License
94 stars 98 forks source link

[FEATURE REQ] Deploy Azure container instances into virtual network #741

Open jacobw125 opened 5 years ago

jacobw125 commented 5 years ago

Is your feature request related to a problem? Please describe. We'd like to be able to deploy container groups into an existing virtual network using the fluent API. The feature exists but doesn't appear to be supported in Java yet: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet#deploy-to-existing-virtual-network

Describe the solution you'd like As part of the ContainerGroup definition, add new builder functions .withVnet().withSubnet().

Describe alternatives you've considered Thought about making a system call out to the Azure CLI tool to avoid this library entirely - not viable for my use case.

Additional context When Microsoft publishes new features into preview, it would be great to know the roadmap for when we can expect to be able to use them in the client libs.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

kurtzeborn commented 5 years ago

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

NikosStathakopoulos-TomTom commented 1 year ago

is there any plan to add this feature? in my team we also find this necessary for our CI.

weidongxu-microsoft commented 1 year ago

@NikosStathakopoulos-TomTom Please note that this repo is deprecated. Please consider migrate to https://aka.ms/azsdk/java/mgmt

@XiaofeiCao Do you know whether we support it now?

XiaofeiCao commented 1 year ago

We should already support this feature in track2 lib: ContainerGroup.WithNetworkProfile

Use case:

ContainerGroup containerGroup1 = azureResourceManager.containerGroups().define(containerGroupName1)
            .withxxx()
            .withExistingSubnet(vnet.subnets().get(subnetName)) // existing subnet
            .create();