published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
An IPSet allows us to group multiple IP addresses, IP subnets and aliases. IPSets can be created on the cluster level, on VM / Container level.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
const ipset = new proxmoxve.firewall.IpsetLegacy("ipset", {
nodeName: example.nodeName,
vmId: example.vmId,
name: "local_network",
comment: "Managed by Pulumi",
cidrs: [
{
name: "192.168.0.0/23",
comment: "Local network 1",
},
{
name: "192.168.0.1",
comment: "Server 1",
nomatch: true,
},
{
name: "192.168.2.1",
comment: "Server 1",
},
],
}, {
dependsOn: [example],
});
import pulumi
import pulumi_proxmoxve as proxmoxve
ipset = proxmoxve.firewall.IpsetLegacy("ipset",
node_name=example["nodeName"],
vm_id=example["vmId"],
name="local_network",
comment="Managed by Pulumi",
cidrs=[
{
"name": "192.168.0.0/23",
"comment": "Local network 1",
},
{
"name": "192.168.0.1",
"comment": "Server 1",
"nomatch": True,
},
{
"name": "192.168.2.1",
"comment": "Server 1",
},
],
opts = pulumi.ResourceOptions(depends_on=[example]))
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve/firewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := firewall.NewIpsetLegacy(ctx, "ipset", &firewall.IpsetLegacyArgs{
NodeName: pulumi.Any(example.NodeName),
VmId: pulumi.Any(example.VmId),
Name: pulumi.String("local_network"),
Comment: pulumi.String("Managed by Pulumi"),
Cidrs: firewall.IpsetLegacyCidrArray{
&firewall.IpsetLegacyCidrArgs{
Name: pulumi.String("192.168.0.0/23"),
Comment: pulumi.String("Local network 1"),
},
&firewall.IpsetLegacyCidrArgs{
Name: pulumi.String("192.168.0.1"),
Comment: pulumi.String("Server 1"),
Nomatch: pulumi.Bool(true),
},
&firewall.IpsetLegacyCidrArgs{
Name: pulumi.String("192.168.2.1"),
Comment: pulumi.String("Server 1"),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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 ipset = new ProxmoxVE.Firewall.IpsetLegacy("ipset", new()
{
NodeName = example.NodeName,
VmId = example.VmId,
Name = "local_network",
Comment = "Managed by Pulumi",
Cidrs = new[]
{
new ProxmoxVE.Firewall.Inputs.IpsetLegacyCidrArgs
{
Name = "192.168.0.0/23",
Comment = "Local network 1",
},
new ProxmoxVE.Firewall.Inputs.IpsetLegacyCidrArgs
{
Name = "192.168.0.1",
Comment = "Server 1",
Nomatch = true,
},
new ProxmoxVE.Firewall.Inputs.IpsetLegacyCidrArgs
{
Name = "192.168.2.1",
Comment = "Server 1",
},
},
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import io.muehlbachler.pulumi.proxmoxve.firewall.IpsetLegacy;
import io.muehlbachler.pulumi.proxmoxve.firewall.IpsetLegacyArgs;
import com.pulumi.proxmoxve.firewall.inputs.IpsetLegacyCidrArgs;
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 ipset = new IpsetLegacy("ipset", IpsetLegacyArgs.builder()
.nodeName(example.nodeName())
.vmId(example.vmId())
.name("local_network")
.comment("Managed by Pulumi")
.cidrs(
IpsetLegacyCidrArgs.builder()
.name("192.168.0.0/23")
.comment("Local network 1")
.build(),
IpsetLegacyCidrArgs.builder()
.name("192.168.0.1")
.comment("Server 1")
.nomatch(true)
.build(),
IpsetLegacyCidrArgs.builder()
.name("192.168.2.1")
.comment("Server 1")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
ipset:
type: proxmoxve:firewall:IpsetLegacy
properties:
nodeName: ${example.nodeName}
vmId: ${example.vmId}
name: local_network
comment: Managed by Pulumi
cidrs:
- name: 192.168.0.0/23
comment: Local network 1
- name: 192.168.0.1
comment: Server 1
nomatch: true
- name: 192.168.2.1
comment: Server 1
options:
dependsOn:
- ${example}
Create IpsetLegacy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpsetLegacy(name: string, args?: IpsetLegacyArgs, opts?: CustomResourceOptions);@overload
def IpsetLegacy(resource_name: str,
args: Optional[IpsetLegacyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IpsetLegacy(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidrs: Optional[Sequence[IpsetLegacyCidrArgs]] = None,
comment: Optional[str] = None,
container_id: Optional[int] = None,
name: Optional[str] = None,
node_name: Optional[str] = None,
vm_id: Optional[int] = None)func NewIpsetLegacy(ctx *Context, name string, args *IpsetLegacyArgs, opts ...ResourceOption) (*IpsetLegacy, error)public IpsetLegacy(string name, IpsetLegacyArgs? args = null, CustomResourceOptions? opts = null)
public IpsetLegacy(String name, IpsetLegacyArgs args)
public IpsetLegacy(String name, IpsetLegacyArgs args, CustomResourceOptions options)
type: proxmoxve:firewall:IpsetLegacy
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 IpsetLegacyArgs
- 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 IpsetLegacyArgs
- 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 IpsetLegacyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpsetLegacyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpsetLegacyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
IpsetLegacy 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 IpsetLegacy resource accepts the following input properties:
- Cidrs
List<Pulumi.
Proxmox VE. Firewall. Inputs. Ipset Legacy Cidr> - IP/CIDR block (multiple blocks supported).
- Comment string
- IPSet comment.
- Container
Id int - Container ID. Leave empty for cluster level ipsets.
- Name string
- IPSet name.
- Node
Name string - Node name. Leave empty for cluster level ipsets.
- Vm
Id int - VM ID. Leave empty for cluster level ipsets.
- Cidrs
[]Ipset
Legacy Cidr Args - IP/CIDR block (multiple blocks supported).
- Comment string
- IPSet comment.
- Container
Id int - Container ID. Leave empty for cluster level ipsets.
- Name string
- IPSet name.
- Node
Name string - Node name. Leave empty for cluster level ipsets.
- Vm
Id int - VM ID. Leave empty for cluster level ipsets.
- cidrs
List<Ipset
Legacy Cidr> - IP/CIDR block (multiple blocks supported).
- comment String
- IPSet comment.
- container
Id Integer - Container ID. Leave empty for cluster level ipsets.
- name String
- IPSet name.
- node
Name String - Node name. Leave empty for cluster level ipsets.
- vm
Id Integer - VM ID. Leave empty for cluster level ipsets.
- cidrs
Ipset
Legacy Cidr[] - IP/CIDR block (multiple blocks supported).
- comment string
- IPSet comment.
- container
Id number - Container ID. Leave empty for cluster level ipsets.
- name string
- IPSet name.
- node
Name string - Node name. Leave empty for cluster level ipsets.
- vm
Id number - VM ID. Leave empty for cluster level ipsets.
- cidrs
Sequence[Ipset
Legacy Cidr Args] - IP/CIDR block (multiple blocks supported).
- comment str
- IPSet comment.
- container_
id int - Container ID. Leave empty for cluster level ipsets.
- name str
- IPSet name.
- node_
name str - Node name. Leave empty for cluster level ipsets.
- vm_
id int - VM ID. Leave empty for cluster level ipsets.
- cidrs List<Property Map>
- IP/CIDR block (multiple blocks supported).
- comment String
- IPSet comment.
- container
Id Number - Container ID. Leave empty for cluster level ipsets.
- name String
- IPSet name.
- node
Name String - Node name. Leave empty for cluster level ipsets.
- vm
Id Number - VM ID. Leave empty for cluster level ipsets.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpsetLegacy 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 IpsetLegacy Resource
Get an existing IpsetLegacy 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?: IpsetLegacyState, opts?: CustomResourceOptions): IpsetLegacy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cidrs: Optional[Sequence[IpsetLegacyCidrArgs]] = None,
comment: Optional[str] = None,
container_id: Optional[int] = None,
name: Optional[str] = None,
node_name: Optional[str] = None,
vm_id: Optional[int] = None) -> IpsetLegacyfunc GetIpsetLegacy(ctx *Context, name string, id IDInput, state *IpsetLegacyState, opts ...ResourceOption) (*IpsetLegacy, error)public static IpsetLegacy Get(string name, Input<string> id, IpsetLegacyState? state, CustomResourceOptions? opts = null)public static IpsetLegacy get(String name, Output<String> id, IpsetLegacyState state, CustomResourceOptions options)resources: _: type: proxmoxve:firewall:IpsetLegacy 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.
- Cidrs
List<Pulumi.
Proxmox VE. Firewall. Inputs. Ipset Legacy Cidr> - IP/CIDR block (multiple blocks supported).
- Comment string
- IPSet comment.
- Container
Id int - Container ID. Leave empty for cluster level ipsets.
- Name string
- IPSet name.
- Node
Name string - Node name. Leave empty for cluster level ipsets.
- Vm
Id int - VM ID. Leave empty for cluster level ipsets.
- Cidrs
[]Ipset
Legacy Cidr Args - IP/CIDR block (multiple blocks supported).
- Comment string
- IPSet comment.
- Container
Id int - Container ID. Leave empty for cluster level ipsets.
- Name string
- IPSet name.
- Node
Name string - Node name. Leave empty for cluster level ipsets.
- Vm
Id int - VM ID. Leave empty for cluster level ipsets.
- cidrs
List<Ipset
Legacy Cidr> - IP/CIDR block (multiple blocks supported).
- comment String
- IPSet comment.
- container
Id Integer - Container ID. Leave empty for cluster level ipsets.
- name String
- IPSet name.
- node
Name String - Node name. Leave empty for cluster level ipsets.
- vm
Id Integer - VM ID. Leave empty for cluster level ipsets.
- cidrs
Ipset
Legacy Cidr[] - IP/CIDR block (multiple blocks supported).
- comment string
- IPSet comment.
- container
Id number - Container ID. Leave empty for cluster level ipsets.
- name string
- IPSet name.
- node
Name string - Node name. Leave empty for cluster level ipsets.
- vm
Id number - VM ID. Leave empty for cluster level ipsets.
- cidrs
Sequence[Ipset
Legacy Cidr Args] - IP/CIDR block (multiple blocks supported).
- comment str
- IPSet comment.
- container_
id int - Container ID. Leave empty for cluster level ipsets.
- name str
- IPSet name.
- node_
name str - Node name. Leave empty for cluster level ipsets.
- vm_
id int - VM ID. Leave empty for cluster level ipsets.
- cidrs List<Property Map>
- IP/CIDR block (multiple blocks supported).
- comment String
- IPSet comment.
- container
Id Number - Container ID. Leave empty for cluster level ipsets.
- name String
- IPSet name.
- node
Name String - Node name. Leave empty for cluster level ipsets.
- vm
Id Number - VM ID. Leave empty for cluster level ipsets.
Supporting Types
IpsetLegacyCidr, IpsetLegacyCidrArgs
Import
Cluster IPSet
Use the import ID: cluster/<ipset_name>
Example uses ipset name localNetwork.
Example:
$ pulumi import proxmoxve:firewall/ipsetLegacy:IpsetLegacy cluster_ipset cluster/local_network
VM IPSet
Use the import ID format: vm/<node_name>/<vm_id>/<ipset_name>
Example uses node name pve and VM ID 100 and ipset name localNetwork.
Example:
$ pulumi import proxmoxve:firewall/ipsetLegacy:IpsetLegacy vm_ipset vm/pve/100/local_network
Container IPSet
Use the import ID format: container/<node_name>/<container_id>/<ipset_name>
Example uses node name pve and container ID 100 and ipset name localNetwork.
Example:
$ pulumi import proxmoxve:firewall/ipsetLegacy:IpsetLegacy container_ipset container/pve/100/local_network
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
proxmoxTerraform Provider.
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
