1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Sdn
  5. getZones
Proxmox Virtual Environment (Proxmox VE) v7.8.1 published on Saturday, Nov 15, 2025 by Daniel Muehlbachler-Pietrzykowski
proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v7.8.1 published on Saturday, Nov 15, 2025 by Daniel Muehlbachler-Pietrzykowski

    Retrieves information about all SDN Zones in Proxmox. This data source can optionally filter zones by type.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    // List all SDN zones
    const all = proxmoxve.Sdn.getZones({});
    // List only EVPN zones
    const evpnOnly = proxmoxve.Sdn.getZones({
        type: "evpn",
    });
    // List only Simple zones  
    const simpleOnly = proxmoxve.Sdn.getZones({
        type: "simple",
    });
    export const dataProxmoxVirtualEnvironmentSdnZonesAll = {
        zones: all.then(all => all.zones),
    };
    export const dataProxmoxVirtualEnvironmentSdnZonesFiltered = {
        evpnZones: evpnOnly.then(evpnOnly => evpnOnly.zones),
        simpleZones: simpleOnly.then(simpleOnly => simpleOnly.zones),
    };
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    # List all SDN zones
    all = proxmoxve.Sdn.get_zones()
    # List only EVPN zones
    evpn_only = proxmoxve.Sdn.get_zones(type="evpn")
    # List only Simple zones  
    simple_only = proxmoxve.Sdn.get_zones(type="simple")
    pulumi.export("dataProxmoxVirtualEnvironmentSdnZonesAll", {
        "zones": all.zones,
    })
    pulumi.export("dataProxmoxVirtualEnvironmentSdnZonesFiltered", {
        "evpnZones": evpn_only.zones,
        "simpleZones": simple_only.zones,
    })
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v7/go/proxmoxve/sdn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// List all SDN zones
    		all, err := sdn.GetZones(ctx, &sdn.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// List only EVPN zones
    		evpnOnly, err := sdn.GetZones(ctx, &sdn.GetZonesArgs{
    			Type: pulumi.StringRef("evpn"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// List only Simple zones
    		simpleOnly, err := sdn.GetZones(ctx, &sdn.GetZonesArgs{
    			Type: pulumi.StringRef("simple"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("dataProxmoxVirtualEnvironmentSdnZonesAll", []sdn.GetZonesZoneMap{
    			"zones": all.Zones,
    		})
    		ctx.Export("dataProxmoxVirtualEnvironmentSdnZonesFiltered", []sdn.GetZonesZoneMap{
    			"evpnZones":   evpnOnly.Zones,
    			"simpleZones": simpleOnly.Zones,
    		})
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        // List all SDN zones
        var all = ProxmoxVE.Sdn.GetZones.Invoke();
    
        // List only EVPN zones
        var evpnOnly = ProxmoxVE.Sdn.GetZones.Invoke(new()
        {
            Type = "evpn",
        });
    
        // List only Simple zones  
        var simpleOnly = ProxmoxVE.Sdn.GetZones.Invoke(new()
        {
            Type = "simple",
        });
    
        return new Dictionary<string, object?>
        {
            ["dataProxmoxVirtualEnvironmentSdnZonesAll"] = 
            {
                { "zones", all.Apply(getZonesResult => getZonesResult.Zones) },
            },
            ["dataProxmoxVirtualEnvironmentSdnZonesFiltered"] = 
            {
                { "evpnZones", evpnOnly.Apply(getZonesResult => getZonesResult.Zones) },
                { "simpleZones", simpleOnly.Apply(getZonesResult => getZonesResult.Zones) },
            },
        };
    });
    
    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.GetZonesArgs;
    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) {
            // List all SDN zones
            final var all = SdnFunctions.getZones(GetZonesArgs.builder()
                .build());
    
            // List only EVPN zones
            final var evpnOnly = SdnFunctions.getZones(GetZonesArgs.builder()
                .type("evpn")
                .build());
    
            // List only Simple zones  
            final var simpleOnly = SdnFunctions.getZones(GetZonesArgs.builder()
                .type("simple")
                .build());
    
            ctx.export("dataProxmoxVirtualEnvironmentSdnZonesAll", Map.of("zones", all.zones()));
            ctx.export("dataProxmoxVirtualEnvironmentSdnZonesFiltered", Map.ofEntries(
                Map.entry("evpnZones", evpnOnly.zones()),
                Map.entry("simpleZones", simpleOnly.zones())
            ));
        }
    }
    
    variables:
      # List all SDN zones
      all:
        fn::invoke:
          function: proxmoxve:Sdn:getZones
          arguments: {}
      # List only EVPN zones
      evpnOnly:
        fn::invoke:
          function: proxmoxve:Sdn:getZones
          arguments:
            type: evpn
      # List only Simple zones
      simpleOnly:
        fn::invoke:
          function: proxmoxve:Sdn:getZones
          arguments:
            type: simple
    outputs:
      dataProxmoxVirtualEnvironmentSdnZonesAll:
        zones: ${all.zones}
      dataProxmoxVirtualEnvironmentSdnZonesFiltered:
        evpnZones: ${evpnOnly.zones}
        simpleZones: ${simpleOnly.zones}
    

    Using getZones

    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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
    function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>
    def get_zones(type: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetZonesResult
    def get_zones_output(type: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
    func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
    func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput

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

    public static class GetZones 
    {
        public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
        public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
    public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: proxmoxve:Sdn/getZones:getZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    Type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    type String
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    type str
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    type String
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).

    getZones Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Zones List<Pulumi.ProxmoxVE.Sdn.Outputs.GetZonesZone>
    List of SDN zones.
    Type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    Id string
    The provider-assigned unique ID for this managed resource.
    Zones []GetZonesZone
    List of SDN zones.
    Type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<GetZonesZone>
    List of SDN zones.
    type String
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    id string
    The provider-assigned unique ID for this managed resource.
    zones GetZonesZone[]
    List of SDN zones.
    type string
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    id str
    The provider-assigned unique ID for this managed resource.
    zones Sequence[GetZonesZone]
    List of SDN zones.
    type str
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<Property Map>
    List of SDN zones.
    type String
    Filter zones by type (simple, vlan, qinq, vxlan, evpn).

    Supporting Types

    GetZonesZone

    AdvertiseSubnets bool
    Bridge string
    Controller string
    Dhcp string
    DisableArpNdSuppression bool
    Dns string
    DnsZone string
    ExitNodes List<string>
    ExitNodesLocalRouting bool
    Id string
    Ipam string
    Mtu int
    Nodes List<string>
    Peers List<string>
    Pending bool
    PrimaryExitNode string
    ReverseDns string
    RtImport string
    ServiceVlan int
    ServiceVlanProtocol string
    State string
    Type string
    VrfVxlan int
    AdvertiseSubnets bool
    Bridge string
    Controller string
    Dhcp string
    DisableArpNdSuppression bool
    Dns string
    DnsZone string
    ExitNodes []string
    ExitNodesLocalRouting bool
    Id string
    Ipam string
    Mtu int
    Nodes []string
    Peers []string
    Pending bool
    PrimaryExitNode string
    ReverseDns string
    RtImport string
    ServiceVlan int
    ServiceVlanProtocol string
    State string
    Type string
    VrfVxlan int
    advertiseSubnets Boolean
    bridge String
    controller String
    dhcp String
    disableArpNdSuppression Boolean
    dns String
    dnsZone String
    exitNodes List<String>
    exitNodesLocalRouting Boolean
    id String
    ipam String
    mtu Integer
    nodes List<String>
    peers List<String>
    pending Boolean
    primaryExitNode String
    reverseDns String
    rtImport String
    serviceVlan Integer
    serviceVlanProtocol String
    state String
    type String
    vrfVxlan Integer
    advertiseSubnets boolean
    bridge string
    controller string
    dhcp string
    disableArpNdSuppression boolean
    dns string
    dnsZone string
    exitNodes string[]
    exitNodesLocalRouting boolean
    id string
    ipam string
    mtu number
    nodes string[]
    peers string[]
    pending boolean
    primaryExitNode string
    reverseDns string
    rtImport string
    serviceVlan number
    serviceVlanProtocol string
    state string
    type string
    vrfVxlan number
    advertiseSubnets Boolean
    bridge String
    controller String
    dhcp String
    disableArpNdSuppression Boolean
    dns String
    dnsZone String
    exitNodes List<String>
    exitNodesLocalRouting Boolean
    id String
    ipam String
    mtu Number
    nodes List<String>
    peers List<String>
    pending Boolean
    primaryExitNode String
    reverseDns String
    rtImport String
    serviceVlan Number
    serviceVlanProtocol String
    state String
    type String
    vrfVxlan Number

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v7.8.1 published on Saturday, Nov 15, 2025 by Daniel Muehlbachler-Pietrzykowski
      Meet Neo: Your AI Platform Teammate