1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. sdn
  5. getVnetLegacy
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.0.0
published on Sunday, Apr 5, 2026 by Daniel Muehlbachler-Pietrzykowski
proxmoxve logo
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.0.0
published on Sunday, Apr 5, 2026 by Daniel Muehlbachler-Pietrzykowski

    Deprecated: Use proxmoxve.sdn.Vnet instead. This data source will be removed in v1.0.

    Retrieves information about an existing SDN VNet.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const example = proxmoxve.sdn.getVnetLegacy({
        id: "vnet1",
    });
    export const dataProxmoxVirtualEnvironmentSdnVnet = {
        id: example.then(example => example.id),
        zone: example.then(example => example.zone),
        alias: example.then(example => example.alias),
        isolatePorts: example.then(example => example.isolatePorts),
        tag: example.then(example => example.tag),
        vlanAware: example.then(example => example.vlanAware),
    };
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    example = proxmoxve.sdn.get_vnet_legacy(id="vnet1")
    pulumi.export("dataProxmoxVirtualEnvironmentSdnVnet", {
        "id": example.id,
        "zone": example.zone,
        "alias": example.alias,
        "isolatePorts": example.isolate_ports,
        "tag": example.tag,
        "vlanAware": example.vlan_aware,
    })
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve/sdn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := sdn.LookupVnetLegacy(ctx, &sdn.LookupVnetLegacyArgs{
    			Id: "vnet1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("dataProxmoxVirtualEnvironmentSdnVnet", pulumi.Map{
    			"id":           example.Id,
    			"zone":         example.Zone,
    			"alias":        example.Alias,
    			"isolatePorts": example.IsolatePorts,
    			"tag":          example.Tag,
    			"vlanAware":    example.VlanAware,
    		})
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        var example = ProxmoxVE.Sdn.GetVnetLegacy.Invoke(new()
        {
            Id = "vnet1",
        });
    
        return new Dictionary<string, object?>
        {
            ["dataProxmoxVirtualEnvironmentSdnVnet"] = 
            {
                { "id", example.Apply(getVnetLegacyResult => getVnetLegacyResult.Id) },
                { "zone", example.Apply(getVnetLegacyResult => getVnetLegacyResult.Zone) },
                { "alias", example.Apply(getVnetLegacyResult => getVnetLegacyResult.Alias) },
                { "isolatePorts", example.Apply(getVnetLegacyResult => getVnetLegacyResult.IsolatePorts) },
                { "tag", example.Apply(getVnetLegacyResult => getVnetLegacyResult.Tag) },
                { "vlanAware", example.Apply(getVnetLegacyResult => getVnetLegacyResult.VlanAware) },
            },
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.sdn.SdnFunctions;
    import com.pulumi.proxmoxve.sdn.inputs.GetVnetLegacyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = SdnFunctions.getVnetLegacy(GetVnetLegacyArgs.builder()
                .id("vnet1")
                .build());
    
            ctx.export("dataProxmoxVirtualEnvironmentSdnVnet", Map.ofEntries(
                Map.entry("id", example.id()),
                Map.entry("zone", example.zone()),
                Map.entry("alias", example.alias()),
                Map.entry("isolatePorts", example.isolatePorts()),
                Map.entry("tag", example.tag()),
                Map.entry("vlanAware", example.vlanAware())
            ));
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: proxmoxve:sdn:getVnetLegacy
          arguments:
            id: vnet1
    outputs:
      dataProxmoxVirtualEnvironmentSdnVnet:
        id: ${example.id}
        zone: ${example.zone}
        alias: ${example.alias}
        isolatePorts: ${example.isolatePorts}
        tag: ${example.tag}
        vlanAware: ${example.vlanAware}
    

    Using getVnetLegacy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVnetLegacy(args: GetVnetLegacyArgs, opts?: InvokeOptions): Promise<GetVnetLegacyResult>
    function getVnetLegacyOutput(args: GetVnetLegacyOutputArgs, opts?: InvokeOptions): Output<GetVnetLegacyResult>
    def get_vnet_legacy(id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetVnetLegacyResult
    def get_vnet_legacy_output(id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetVnetLegacyResult]
    func LookupVnetLegacy(ctx *Context, args *LookupVnetLegacyArgs, opts ...InvokeOption) (*LookupVnetLegacyResult, error)
    func LookupVnetLegacyOutput(ctx *Context, args *LookupVnetLegacyOutputArgs, opts ...InvokeOption) LookupVnetLegacyResultOutput

    > Note: This function is named LookupVnetLegacy in the Go SDK.

    public static class GetVnetLegacy 
    {
        public static Task<GetVnetLegacyResult> InvokeAsync(GetVnetLegacyArgs args, InvokeOptions? opts = null)
        public static Output<GetVnetLegacyResult> Invoke(GetVnetLegacyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVnetLegacyResult> getVnetLegacy(GetVnetLegacyArgs args, InvokeOptions options)
    public static Output<GetVnetLegacyResult> getVnetLegacy(GetVnetLegacyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: proxmoxve:sdn/getVnetLegacy:getVnetLegacy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique identifier of the SDN VNet.
    Id string
    The unique identifier of the SDN VNet.
    id String
    The unique identifier of the SDN VNet.
    id string
    The unique identifier of the SDN VNet.
    id str
    The unique identifier of the SDN VNet.
    id String
    The unique identifier of the SDN VNet.

    getVnetLegacy Result

    The following output properties are available:

    Alias string
    An optional alias for this VNet.
    Id string
    The unique identifier of the SDN VNet.
    IsolatePorts bool
    Isolate ports within this VNet.
    Tag int
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    VlanAware bool
    Allow VM VLANs to pass through this VNet.
    Zone string
    The zone to which this VNet belongs.
    Alias string
    An optional alias for this VNet.
    Id string
    The unique identifier of the SDN VNet.
    IsolatePorts bool
    Isolate ports within this VNet.
    Tag int
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    VlanAware bool
    Allow VM VLANs to pass through this VNet.
    Zone string
    The zone to which this VNet belongs.
    alias String
    An optional alias for this VNet.
    id String
    The unique identifier of the SDN VNet.
    isolatePorts Boolean
    Isolate ports within this VNet.
    tag Integer
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    vlanAware Boolean
    Allow VM VLANs to pass through this VNet.
    zone String
    The zone to which this VNet belongs.
    alias string
    An optional alias for this VNet.
    id string
    The unique identifier of the SDN VNet.
    isolatePorts boolean
    Isolate ports within this VNet.
    tag number
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    vlanAware boolean
    Allow VM VLANs to pass through this VNet.
    zone string
    The zone to which this VNet belongs.
    alias str
    An optional alias for this VNet.
    id str
    The unique identifier of the SDN VNet.
    isolate_ports bool
    Isolate ports within this VNet.
    tag int
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    vlan_aware bool
    Allow VM VLANs to pass through this VNet.
    zone str
    The zone to which this VNet belongs.
    alias String
    An optional alias for this VNet.
    id String
    The unique identifier of the SDN VNet.
    isolatePorts Boolean
    Isolate ports within this VNet.
    tag Number
    Tag value for VLAN/VXLAN (can't be used with other zone types).
    vlanAware Boolean
    Allow VM VLANs to pass through this VNet.
    zone String
    The zone to which this VNet belongs.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.0.0
    published on Sunday, Apr 5, 2026 by Daniel Muehlbachler-Pietrzykowski
      Try Pulumi Cloud free. Your team will thank you.