1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. sdn
  5. Subnet
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

    Manages SDN Subnets in Proxmox VE.

    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.

    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.