proxmoxve.Sdn.Vnet
Explore with Pulumi AI

Manages Proxmox VE SDN VNet.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
const finalizer = new proxmoxve.sdn.Applier("finalizer", {});
// SDN Zone (Simple) - Basic zone for simple vnets
const exampleZone1 = new proxmoxve.sdnzone.Simple("exampleZone1", {
zoneId: "zone1",
nodes: ["pve"],
mtu: 1500,
dns: "1.1.1.1",
dnsZone: "example.com",
ipam: "pve",
reverseDns: "1.1.1.1",
}, {
dependsOn: [finalizer],
});
// SDN Zone (Simple) - Second zone for demonstration
const exampleZone2 = new proxmoxve.sdnzone.Simple("exampleZone2", {
zoneId: "zone2",
nodes: ["pve"],
mtu: 1500,
}, {
dependsOn: [finalizer],
});
// Basic VNet (Simple)
const basicVnet = new proxmoxve.sdn.Vnet("basicVnet", {
vnetId: "vnet1",
zone: exampleZone1.zoneId,
}, {
dependsOn: [finalizer],
});
// VNet with Alias and Port Isolation
const isolatedVnet = new proxmoxve.sdn.Vnet("isolatedVnet", {
vnetId: "vnet2",
zone: exampleZone2.zoneId,
alias: "Isolated VNet",
isolatePorts: true,
vlanAware: false,
}, {
dependsOn: [finalizer],
});
// SDN Applier for all resources
const vnetApplier = new proxmoxve.sdn.Applier("vnetApplier", {}, {
dependsOn: [
exampleZone1,
exampleZone2,
basicVnet,
isolatedVnet,
],
});
import pulumi
import pulumi_proxmoxve as proxmoxve
finalizer = proxmoxve.sdn.Applier("finalizer")
# SDN Zone (Simple) - Basic zone for simple vnets
example_zone1 = proxmoxve.sdnzone.Simple("exampleZone1",
zone_id="zone1",
nodes=["pve"],
mtu=1500,
dns="1.1.1.1",
dns_zone="example.com",
ipam="pve",
reverse_dns="1.1.1.1",
opts = pulumi.ResourceOptions(depends_on=[finalizer]))
# SDN Zone (Simple) - Second zone for demonstration
example_zone2 = proxmoxve.sdnzone.Simple("exampleZone2",
zone_id="zone2",
nodes=["pve"],
mtu=1500,
opts = pulumi.ResourceOptions(depends_on=[finalizer]))
# Basic VNet (Simple)
basic_vnet = proxmoxve.sdn.Vnet("basicVnet",
vnet_id="vnet1",
zone=example_zone1.zone_id,
opts = pulumi.ResourceOptions(depends_on=[finalizer]))
# VNet with Alias and Port Isolation
isolated_vnet = proxmoxve.sdn.Vnet("isolatedVnet",
vnet_id="vnet2",
zone=example_zone2.zone_id,
alias="Isolated VNet",
isolate_ports=True,
vlan_aware=False,
opts = pulumi.ResourceOptions(depends_on=[finalizer]))
# SDN Applier for all resources
vnet_applier = proxmoxve.sdn.Applier("vnetApplier", opts = pulumi.ResourceOptions(depends_on=[
example_zone1,
example_zone2,
basic_vnet,
isolated_vnet,
]))
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v7/go/proxmoxve/sdn"
"github.com/muhlba91/pulumi-proxmoxve/sdk/v7/go/proxmoxve/sdnzone"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
finalizer, err := sdn.NewApplier(ctx, "finalizer", nil)
if err != nil {
return err
}
// SDN Zone (Simple) - Basic zone for simple vnets
exampleZone1, err := sdnzone.NewSimple(ctx, "exampleZone1", &sdnzone.SimpleArgs{
ZoneId: pulumi.String("zone1"),
Nodes: pulumi.StringArray{
pulumi.String("pve"),
},
Mtu: pulumi.Int(1500),
Dns: pulumi.String("1.1.1.1"),
DnsZone: pulumi.String("example.com"),
Ipam: pulumi.String("pve"),
ReverseDns: pulumi.String("1.1.1.1"),
}, pulumi.DependsOn([]pulumi.Resource{
finalizer,
}))
if err != nil {
return err
}
// SDN Zone (Simple) - Second zone for demonstration
exampleZone2, err := sdnzone.NewSimple(ctx, "exampleZone2", &sdnzone.SimpleArgs{
ZoneId: pulumi.String("zone2"),
Nodes: pulumi.StringArray{
pulumi.String("pve"),
},
Mtu: pulumi.Int(1500),
}, pulumi.DependsOn([]pulumi.Resource{
finalizer,
}))
if err != nil {
return err
}
// Basic VNet (Simple)
basicVnet, err := sdn.NewVnet(ctx, "basicVnet", &sdn.VnetArgs{
VnetId: pulumi.String("vnet1"),
Zone: exampleZone1.ZoneId,
}, pulumi.DependsOn([]pulumi.Resource{
finalizer,
}))
if err != nil {
return err
}
// VNet with Alias and Port Isolation
isolatedVnet, err := sdn.NewVnet(ctx, "isolatedVnet", &sdn.VnetArgs{
VnetId: pulumi.String("vnet2"),
Zone: exampleZone2.ZoneId,
Alias: pulumi.String("Isolated VNet"),
IsolatePorts: pulumi.Bool(true),
VlanAware: pulumi.Bool(false),
}, pulumi.DependsOn([]pulumi.Resource{
finalizer,
}))
if err != nil {
return err
}
// SDN Applier for all resources
_, err = sdn.NewApplier(ctx, "vnetApplier", nil, pulumi.DependsOn([]pulumi.Resource{
exampleZone1,
exampleZone2,
basicVnet,
isolatedVnet,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;
return await Deployment.RunAsync(() =>
{
var finalizer = new ProxmoxVE.Sdn.Applier("finalizer");
// SDN Zone (Simple) - Basic zone for simple vnets
var exampleZone1 = new ProxmoxVE.SDNZone.Simple("exampleZone1", new()
{
ZoneId = "zone1",
Nodes = new[]
{
"pve",
},
Mtu = 1500,
Dns = "1.1.1.1",
DnsZone = "example.com",
Ipam = "pve",
ReverseDns = "1.1.1.1",
}, new CustomResourceOptions
{
DependsOn =
{
finalizer,
},
});
// SDN Zone (Simple) - Second zone for demonstration
var exampleZone2 = new ProxmoxVE.SDNZone.Simple("exampleZone2", new()
{
ZoneId = "zone2",
Nodes = new[]
{
"pve",
},
Mtu = 1500,
}, new CustomResourceOptions
{
DependsOn =
{
finalizer,
},
});
// Basic VNet (Simple)
var basicVnet = new ProxmoxVE.Sdn.Vnet("basicVnet", new()
{
VnetId = "vnet1",
Zone = exampleZone1.ZoneId,
}, new CustomResourceOptions
{
DependsOn =
{
finalizer,
},
});
// VNet with Alias and Port Isolation
var isolatedVnet = new ProxmoxVE.Sdn.Vnet("isolatedVnet", new()
{
VnetId = "vnet2",
Zone = exampleZone2.ZoneId,
Alias = "Isolated VNet",
IsolatePorts = true,
VlanAware = false,
}, new CustomResourceOptions
{
DependsOn =
{
finalizer,
},
});
// SDN Applier for all resources
var vnetApplier = new ProxmoxVE.Sdn.Applier("vnetApplier", new()
{
}, new CustomResourceOptions
{
DependsOn =
{
exampleZone1,
exampleZone2,
basicVnet,
isolatedVnet,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import io.muehlbachler.pulumi.proxmoxve.Sdn.Applier;
import io.muehlbachler.pulumi.proxmoxve.SDNZone.Simple;
import io.muehlbachler.pulumi.proxmoxve.SDNZone.SimpleArgs;
import io.muehlbachler.pulumi.proxmoxve.Sdn.Vnet;
import io.muehlbachler.pulumi.proxmoxve.Sdn.VnetArgs;
import io.muehlbachler.pulumi.proxmoxve.Sdn.ApplierArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
var finalizer = new Applier("finalizer");
// SDN Zone (Simple) - Basic zone for simple vnets
var exampleZone1 = new Simple("exampleZone1", SimpleArgs.builder()
.zoneId("zone1")
.nodes("pve")
.mtu(1500)
.dns("1.1.1.1")
.dnsZone("example.com")
.ipam("pve")
.reverseDns("1.1.1.1")
.build(), CustomResourceOptions.builder()
.dependsOn(finalizer)
.build());
// SDN Zone (Simple) - Second zone for demonstration
var exampleZone2 = new Simple("exampleZone2", SimpleArgs.builder()
.zoneId("zone2")
.nodes("pve")
.mtu(1500)
.build(), CustomResourceOptions.builder()
.dependsOn(finalizer)
.build());
// Basic VNet (Simple)
var basicVnet = new Vnet("basicVnet", VnetArgs.builder()
.vnetId("vnet1")
.zone(exampleZone1.zoneId())
.build(), CustomResourceOptions.builder()
.dependsOn(finalizer)
.build());
// VNet with Alias and Port Isolation
var isolatedVnet = new Vnet("isolatedVnet", VnetArgs.builder()
.vnetId("vnet2")
.zone(exampleZone2.zoneId())
.alias("Isolated VNet")
.isolatePorts(true)
.vlanAware(false)
.build(), CustomResourceOptions.builder()
.dependsOn(finalizer)
.build());
// SDN Applier for all resources
var vnetApplier = new Applier("vnetApplier", ApplierArgs.Empty, CustomResourceOptions.builder()
.dependsOn(
exampleZone1,
exampleZone2,
basicVnet,
isolatedVnet)
.build());
}
}
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}
# Basic VNet (Simple)
basicVnet:
type: proxmoxve:Sdn:Vnet
properties:
vnetId: vnet1
zone: ${exampleZone1.zoneId}
options:
dependsOn:
- ${finalizer}
# VNet with Alias and Port Isolation
isolatedVnet:
type: proxmoxve:Sdn:Vnet
properties:
vnetId: vnet2
zone: ${exampleZone2.zoneId}
alias: Isolated VNet
isolatePorts: true
vlanAware: false
options:
dependsOn:
- ${finalizer}
# SDN Applier for all resources
vnetApplier:
type: proxmoxve:Sdn:Applier
options:
dependsOn:
- ${exampleZone1}
- ${exampleZone2}
- ${basicVnet}
- ${isolatedVnet}
finalizer:
type: proxmoxve:Sdn:Applier
Create Vnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Vnet(name: string, args: VnetArgs, opts?: CustomResourceOptions);
@overload
def Vnet(resource_name: str,
args: VnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Vnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
vnet_id: Optional[str] = None,
zone: Optional[str] = None,
alias: Optional[str] = None,
isolate_ports: Optional[bool] = None,
tag: Optional[int] = None,
vlan_aware: Optional[bool] = None)
func NewVnet(ctx *Context, name string, args VnetArgs, opts ...ResourceOption) (*Vnet, error)
public Vnet(string name, VnetArgs args, CustomResourceOptions? opts = null)
type: proxmoxve:Sdn:Vnet
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 VnetArgs
- 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 VnetArgs
- 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 VnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VnetArgs
- 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 vnetResource = new ProxmoxVE.Sdn.Vnet("vnetResource", new()
{
VnetId = "string",
Zone = "string",
Alias = "string",
IsolatePorts = false,
Tag = 0,
VlanAware = false,
});
example, err := sdn.NewVnet(ctx, "vnetResource", &sdn.VnetArgs{
VnetId: pulumi.String("string"),
Zone: pulumi.String("string"),
Alias: pulumi.String("string"),
IsolatePorts: pulumi.Bool(false),
Tag: pulumi.Int(0),
VlanAware: pulumi.Bool(false),
})
var vnetResource = new Vnet("vnetResource", VnetArgs.builder()
.vnetId("string")
.zone("string")
.alias("string")
.isolatePorts(false)
.tag(0)
.vlanAware(false)
.build());
vnet_resource = proxmoxve.sdn.Vnet("vnetResource",
vnet_id="string",
zone="string",
alias="string",
isolate_ports=False,
tag=0,
vlan_aware=False)
const vnetResource = new proxmoxve.sdn.Vnet("vnetResource", {
vnetId: "string",
zone: "string",
alias: "string",
isolatePorts: false,
tag: 0,
vlanAware: false,
});
type: proxmoxve:Sdn:Vnet
properties:
alias: string
isolatePorts: false
tag: 0
vlanAware: false
vnetId: string
zone: string
Vnet 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 Vnet resource accepts the following input properties:
- Vnet
Id string - The unique identifier of the SDN VNet.
- Zone string
- The zone to which this VNet belongs.
- Alias string
- An optional alias for this 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.
- Vnet
Id string - The unique identifier of the SDN VNet.
- Zone string
- The zone to which this VNet belongs.
- Alias string
- An optional alias for this 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.
- vnet
Id String - The unique identifier of the SDN VNet.
- zone String
- The zone to which this VNet belongs.
- alias String
- An optional alias for this VNet.
- isolate
Ports Boolean - Isolate ports within this VNet.
- tag Integer
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware Boolean - Allow VM VLANs to pass through this VNet.
- vnet
Id string - The unique identifier of the SDN VNet.
- zone string
- The zone to which this VNet belongs.
- alias string
- An optional alias for this VNet.
- isolate
Ports boolean - Isolate ports within this VNet.
- tag number
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware boolean - Allow VM VLANs to pass through this VNet.
- vnet_
id str - The unique identifier of the SDN VNet.
- zone str
- The zone to which this VNet belongs.
- alias str
- An optional alias for this 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.
- vnet
Id String - The unique identifier of the SDN VNet.
- zone String
- The zone to which this VNet belongs.
- alias String
- An optional alias for this VNet.
- isolate
Ports Boolean - Isolate ports within this VNet.
- tag Number
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware Boolean - Allow VM VLANs to pass through this VNet.
Outputs
All input properties are implicitly available as output properties. Additionally, the Vnet 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 Vnet Resource
Get an existing Vnet 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?: VnetState, opts?: CustomResourceOptions): Vnet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
isolate_ports: Optional[bool] = None,
tag: Optional[int] = None,
vlan_aware: Optional[bool] = None,
vnet_id: Optional[str] = None,
zone: Optional[str] = None) -> Vnet
func GetVnet(ctx *Context, name string, id IDInput, state *VnetState, opts ...ResourceOption) (*Vnet, error)
public static Vnet Get(string name, Input<string> id, VnetState? state, CustomResourceOptions? opts = null)
public static Vnet get(String name, Output<String> id, VnetState state, CustomResourceOptions options)
resources: _: type: proxmoxve:Sdn:Vnet 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.
- Alias string
- An optional alias for this 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.
- Vnet
Id string - The unique identifier of the SDN VNet.
- Zone string
- The zone to which this VNet belongs.
- Alias string
- An optional alias for this 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.
- Vnet
Id string - The unique identifier of the SDN VNet.
- Zone string
- The zone to which this VNet belongs.
- alias String
- An optional alias for this VNet.
- isolate
Ports Boolean - Isolate ports within this VNet.
- tag Integer
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware Boolean - Allow VM VLANs to pass through this VNet.
- vnet
Id String - The unique identifier of the SDN VNet.
- zone String
- The zone to which this VNet belongs.
- alias string
- An optional alias for this VNet.
- isolate
Ports boolean - Isolate ports within this VNet.
- tag number
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware boolean - Allow VM VLANs to pass through this VNet.
- vnet
Id string - The unique identifier of the SDN VNet.
- zone string
- The zone to which this VNet belongs.
- alias str
- An optional alias for this 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.
- vnet_
id str - The unique identifier of the SDN VNet.
- zone str
- The zone to which this VNet belongs.
- alias String
- An optional alias for this VNet.
- isolate
Ports Boolean - Isolate ports within this VNet.
- tag Number
- Tag value for VLAN/VXLAN (can't be used with other zone types).
- vlan
Aware Boolean - Allow VM VLANs to pass through this VNet.
- vnet
Id String - The unique identifier of the SDN VNet.
- zone String
- The zone to which this VNet belongs.
Import
#!/usr/bin/env sh
SDN vnet can be imported using its unique identifier (vnet ID)
$ pulumi import proxmoxve:Sdn/vnet:Vnet basic_vnet vnet1
$ pulumi import proxmoxve:Sdn/vnet:Vnet isolated_vnet vnet2
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.
