1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Sdn
  5. Subnet
Proxmox Virtual Environment (Proxmox VE) v7.7.0 published on Sunday, Oct 12, 2025 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Sdn.Subnet

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v7.7.0 published on Sunday, Oct 12, 2025 by Daniel Muehlbachler-Pietrzykowski

    Manages SDN Subnets in Proxmox VE.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      # SDN Zone (Simple) - Basic zone for simple vnets
      exampleZone1:
        type: proxmoxve:SDNZone:Simple
        properties:
          zoneId: zone1
          nodes:
            - pve
          mtu: 1500
          # Optional attributes
          dns: 1.1.1.1
          dnsZone: example.com
          ipam: pve
          reverseDns: 1.1.1.1
        options:
          dependsOn:
            - ${finalizer}
      # SDN Zone (Simple) - Second zone for demonstration
      exampleZone2:
        type: proxmoxve:SDNZone:Simple
        properties:
          zoneId: zone2
          nodes:
            - pve
          mtu: 1500
        options:
          dependsOn:
            - ${finalizer}
      # SDN VNet - Basic vnet
      exampleVnet1:
        type: proxmoxve:Sdn:Vnet
        properties:
          vnetId: vnet1
          zone: ${exampleZone1.zoneId}
        options:
          dependsOn:
            - ${finalizer}
      # SDN VNet - VNet with alias and port isolation
      exampleVnet2:
        type: proxmoxve:Sdn:Vnet
        properties:
          vnetId: vnet2
          zone: ${exampleZone2.zoneId}
          alias: Example VNet 2
          isolatePorts: true
          vlanAware: false
        options:
          dependsOn:
            - ${finalizer}
      # Basic Subnet
      basicSubnet:
        type: proxmoxve:Sdn:Subnet
        properties:
          cidr: 192.168.1.0/24
          vnet: ${exampleVnet1.vnetId}
          gateway: 192.168.1.1
        options:
          dependsOn:
            - ${finalizer}
      # Subnet with DHCP Configuration
      dhcpSubnet:
        type: proxmoxve:Sdn:Subnet
        properties:
          cidr: 192.168.2.0/24
          vnet: ${exampleVnet2.vnetId}
          gateway: 192.168.2.1
          dhcpDnsServer: 192.168.2.53
          dnsZonePrefix: internal.example.com
          snat: true
          dhcpRange:
            start_address: 192.168.2.10
            end_address: 192.168.2.100
        options:
          dependsOn:
            - ${finalizer}
      # SDN Applier for all resources
      subnetApplier:
        type: proxmoxve:Sdn:Applier
        options:
          dependsOn:
            - ${exampleZone1}
            - ${exampleZone2}
            - ${exampleVnet1}
            - ${exampleVnet2}
            - ${basicSubnet}
            - ${dhcpSubnet}
      finalizer:
        type: proxmoxve:Sdn:Applier
    

    Create Subnet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
    @overload
    def Subnet(resource_name: str,
               args: SubnetArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subnet(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               cidr: Optional[str] = None,
               vnet: Optional[str] = None,
               dhcp_dns_server: Optional[str] = None,
               dhcp_range: Optional[SubnetDhcpRangeArgs] = None,
               dns_zone_prefix: Optional[str] = None,
               gateway: Optional[str] = None,
               snat: Optional[bool] = None)
    func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
    public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
    public Subnet(String name, SubnetArgs args)
    public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Sdn:Subnet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var subnetResource = new ProxmoxVE.Sdn.Subnet("subnetResource", new()
    {
        Cidr = "string",
        Vnet = "string",
        DhcpDnsServer = "string",
        DhcpRange = new ProxmoxVE.Sdn.Inputs.SubnetDhcpRangeArgs
        {
            EndAddress = "string",
            StartAddress = "string",
        },
        DnsZonePrefix = "string",
        Gateway = "string",
        Snat = false,
    });
    
    example, err := sdn.NewSubnet(ctx, "subnetResource", &sdn.SubnetArgs{
    	Cidr:          pulumi.String("string"),
    	Vnet:          pulumi.String("string"),
    	DhcpDnsServer: pulumi.String("string"),
    	DhcpRange: &sdn.SubnetDhcpRangeArgs{
    		EndAddress:   pulumi.String("string"),
    		StartAddress: pulumi.String("string"),
    	},
    	DnsZonePrefix: pulumi.String("string"),
    	Gateway:       pulumi.String("string"),
    	Snat:          pulumi.Bool(false),
    })
    
    var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
        .cidr("string")
        .vnet("string")
        .dhcpDnsServer("string")
        .dhcpRange(SubnetDhcpRangeArgs.builder()
            .endAddress("string")
            .startAddress("string")
            .build())
        .dnsZonePrefix("string")
        .gateway("string")
        .snat(false)
        .build());
    
    subnet_resource = proxmoxve.sdn.Subnet("subnetResource",
        cidr="string",
        vnet="string",
        dhcp_dns_server="string",
        dhcp_range={
            "end_address": "string",
            "start_address": "string",
        },
        dns_zone_prefix="string",
        gateway="string",
        snat=False)
    
    const subnetResource = new proxmoxve.sdn.Subnet("subnetResource", {
        cidr: "string",
        vnet: "string",
        dhcpDnsServer: "string",
        dhcpRange: {
            endAddress: "string",
            startAddress: "string",
        },
        dnsZonePrefix: "string",
        gateway: "string",
        snat: false,
    });
    
    type: proxmoxve:Sdn:Subnet
    properties:
        cidr: string
        dhcpDnsServer: string
        dhcpRange:
            endAddress: string
            startAddress: string
        dnsZonePrefix: string
        gateway: string
        snat: false
        vnet: string
    

    Subnet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Subnet resource accepts the following input properties:

    Cidr string
    A CIDR network address, for example 10.0.0.0/8
    Vnet string
    The VNet to which this subnet belongs.
    DhcpDnsServer string
    The DNS server used for DHCP.
    DhcpRange Pulumi.ProxmoxVE.Sdn.Inputs.SubnetDhcpRange
    DHCP range (start and end IPs).
    DnsZonePrefix string
    Prefix used for DNS zone delegation.
    Gateway string
    The gateway address for the subnet.
    Snat bool
    Whether SNAT is enabled for the subnet.
    Cidr string
    A CIDR network address, for example 10.0.0.0/8
    Vnet string
    The VNet to which this subnet belongs.
    DhcpDnsServer string
    The DNS server used for DHCP.
    DhcpRange SubnetDhcpRangeArgs
    DHCP range (start and end IPs).
    DnsZonePrefix string
    Prefix used for DNS zone delegation.
    Gateway string
    The gateway address for the subnet.
    Snat bool
    Whether SNAT is enabled for the subnet.
    cidr String
    A CIDR network address, for example 10.0.0.0/8
    vnet String
    The VNet to which this subnet belongs.
    dhcpDnsServer String
    The DNS server used for DHCP.
    dhcpRange SubnetDhcpRange
    DHCP range (start and end IPs).
    dnsZonePrefix String
    Prefix used for DNS zone delegation.
    gateway String
    The gateway address for the subnet.
    snat Boolean
    Whether SNAT is enabled for the subnet.
    cidr string
    A CIDR network address, for example 10.0.0.0/8
    vnet string
    The VNet to which this subnet belongs.
    dhcpDnsServer string
    The DNS server used for DHCP.
    dhcpRange SubnetDhcpRange
    DHCP range (start and end IPs).
    dnsZonePrefix string
    Prefix used for DNS zone delegation.
    gateway string
    The gateway address for the subnet.
    snat boolean
    Whether SNAT is enabled for the subnet.
    cidr str
    A CIDR network address, for example 10.0.0.0/8
    vnet str
    The VNet to which this subnet belongs.
    dhcp_dns_server str
    The DNS server used for DHCP.
    dhcp_range SubnetDhcpRangeArgs
    DHCP range (start and end IPs).
    dns_zone_prefix str
    Prefix used for DNS zone delegation.
    gateway str
    The gateway address for the subnet.
    snat bool
    Whether SNAT is enabled for the subnet.
    cidr String
    A CIDR network address, for example 10.0.0.0/8
    vnet String
    The VNet to which this subnet belongs.
    dhcpDnsServer String
    The DNS server used for DHCP.
    dhcpRange Property Map
    DHCP range (start and end IPs).
    dnsZonePrefix String
    Prefix used for DNS zone delegation.
    gateway String
    The gateway address for the subnet.
    snat Boolean
    Whether SNAT is enabled for the subnet.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Subnet Resource

    Get an existing Subnet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubnetState, opts?: CustomResourceOptions): Subnet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr: Optional[str] = None,
            dhcp_dns_server: Optional[str] = None,
            dhcp_range: Optional[SubnetDhcpRangeArgs] = None,
            dns_zone_prefix: Optional[str] = None,
            gateway: Optional[str] = None,
            snat: Optional[bool] = None,
            vnet: Optional[str] = None) -> Subnet
    func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
    public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
    public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
    resources:  _:    type: proxmoxve:Sdn:Subnet    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Cidr string
    A CIDR network address, for example 10.0.0.0/8
    DhcpDnsServer string
    The DNS server used for DHCP.
    DhcpRange Pulumi.ProxmoxVE.Sdn.Inputs.SubnetDhcpRange
    DHCP range (start and end IPs).
    DnsZonePrefix string
    Prefix used for DNS zone delegation.
    Gateway string
    The gateway address for the subnet.
    Snat bool
    Whether SNAT is enabled for the subnet.
    Vnet string
    The VNet to which this subnet belongs.
    Cidr string
    A CIDR network address, for example 10.0.0.0/8
    DhcpDnsServer string
    The DNS server used for DHCP.
    DhcpRange SubnetDhcpRangeArgs
    DHCP range (start and end IPs).
    DnsZonePrefix string
    Prefix used for DNS zone delegation.
    Gateway string
    The gateway address for the subnet.
    Snat bool
    Whether SNAT is enabled for the subnet.
    Vnet string
    The VNet to which this subnet belongs.
    cidr String
    A CIDR network address, for example 10.0.0.0/8
    dhcpDnsServer String
    The DNS server used for DHCP.
    dhcpRange SubnetDhcpRange
    DHCP range (start and end IPs).
    dnsZonePrefix String
    Prefix used for DNS zone delegation.
    gateway String
    The gateway address for the subnet.
    snat Boolean
    Whether SNAT is enabled for the subnet.
    vnet String
    The VNet to which this subnet belongs.
    cidr string
    A CIDR network address, for example 10.0.0.0/8
    dhcpDnsServer string
    The DNS server used for DHCP.
    dhcpRange SubnetDhcpRange
    DHCP range (start and end IPs).
    dnsZonePrefix string
    Prefix used for DNS zone delegation.
    gateway string
    The gateway address for the subnet.
    snat boolean
    Whether SNAT is enabled for the subnet.
    vnet string
    The VNet to which this subnet belongs.
    cidr str
    A CIDR network address, for example 10.0.0.0/8
    dhcp_dns_server str
    The DNS server used for DHCP.
    dhcp_range SubnetDhcpRangeArgs
    DHCP range (start and end IPs).
    dns_zone_prefix str
    Prefix used for DNS zone delegation.
    gateway str
    The gateway address for the subnet.
    snat bool
    Whether SNAT is enabled for the subnet.
    vnet str
    The VNet to which this subnet belongs.
    cidr String
    A CIDR network address, for example 10.0.0.0/8
    dhcpDnsServer String
    The DNS server used for DHCP.
    dhcpRange Property Map
    DHCP range (start and end IPs).
    dnsZonePrefix String
    Prefix used for DNS zone delegation.
    gateway String
    The gateway address for the subnet.
    snat Boolean
    Whether SNAT is enabled for the subnet.
    vnet String
    The VNet to which this subnet belongs.

    Supporting Types

    SubnetDhcpRange, SubnetDhcpRangeArgs

    EndAddress string
    End of the DHCP range.
    StartAddress string
    Start of the DHCP range.
    EndAddress string
    End of the DHCP range.
    StartAddress string
    Start of the DHCP range.
    endAddress String
    End of the DHCP range.
    startAddress String
    Start of the DHCP range.
    endAddress string
    End of the DHCP range.
    startAddress string
    Start of the DHCP range.
    end_address str
    End of the DHCP range.
    start_address str
    Start of the DHCP range.
    endAddress String
    End of the DHCP range.
    startAddress String
    Start of the DHCP range.

    Import

    #!/usr/bin/env sh

    SDN subnet can be imported using its unique identifier in the format: /

    The is the canonical ID from Proxmox, e.g., “zone1-192.168.1.0-24”

    $ pulumi import proxmoxve:Sdn/subnet:Subnet basic_subnet vnet1/zone1-192.168.1.0-24
    
    $ pulumi import proxmoxve:Sdn/subnet:Subnet dhcp_subnet vnet2/zone2-192.168.2.0-24
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.7.0 published on Sunday, Oct 12, 2025 by Daniel Muehlbachler-Pietrzykowski
      AI Agentic Workflows: Register now