Azure-sdk-for-net: [QUERY] Create ipv6 public ip adress

Created on 28 May 2020  路  5Comments  路  Source: Azure/azure-sdk-for-net

I'm trying to create a public ipv6 ip address but i can't find a way to specify the ip version, this is what i have

        var publicIPAddress = azure.PublicIPAddresses
            .Define(basename + "ip")
            .WithRegion(region)
            .WithExistingResourceGroup(resourceGroupName)
            .WithSku(PublicIPSkuType.Standard).WithLeafDomainLabel("test").
            .Create();

Are ipv6 addresses not supported? is there another (f.e. non fluent) way to create it in code?

Mgmt Network customer-reported needs-team-attention question

Most helpful comment

@aL3891

Workaround

            var publicIPAddress = azure.PublicIPAddresses
                .Define(basename + "ip")
                .WithRegion(region)
                .WithExistingResourceGroup(resourceGroupName)
                .WithSku(PublicIPSkuType.Standard).WithLeafDomainLabel("test");
            (publicIPAddress as IPublicIPAddress).Inner.PublicIPAddressVersion = Microsoft.Azure.Management.Network.Fluent.Models.IPVersion.IPv6;
            publicIPAddress.Create();

All 5 comments

@weidongxu-microsoft could you help answer this question? Thanks

@aL3891

Workaround

            var publicIPAddress = azure.PublicIPAddresses
                .Define(basename + "ip")
                .WithRegion(region)
                .WithExistingResourceGroup(resourceGroupName)
                .WithSku(PublicIPSkuType.Standard).WithLeafDomainLabel("test");
            (publicIPAddress as IPublicIPAddress).Inner.PublicIPAddressVersion = Microsoft.Azure.Management.Network.Fluent.Models.IPVersion.IPv6;
            publicIPAddress.Create();

i see thanks, i guess fluent methods for this are planned? i've ran into some other places where i've needed to fall back on the "inner" versions in the process of setting up a ipv4/ipv6 network, are you taking contributions for fluent configuration methods like this?

thanks, i'll check it out :)

Was this page helpful?
0 / 5 - 0 ratings