1. Packages
  2. Packages
  3. Proxmox Virtual Environment (Proxmox VE)
  4. API Docs
  5. Harule
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
proxmoxve logo
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski

    Manages a High Availability rule in a Proxmox VE cluster (PVE 9+). HA rules replace the legacy HA groups and provide node affinity and resource affinity capabilities.

    Note: This resource requires Proxmox VE 9.0 or later. In PVE 9, HA groups have been replaced by HA rules, which provide node affinity and resource affinity capabilities. For PVE 8 and earlier, use proxmoxve.Hagroup instead.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    // Node Affinity Rule: assign VMs to preferred nodes with priorities.
    // Non-strict rules allow failover to other nodes; strict rules do not.
    const preferNode1 = new proxmoxve.Harule("prefer_node1", {
        rule: "prefer-node1",
        type: "node-affinity",
        comment: "Prefer node1 for these VMs",
        resources: [
            "vm:100",
            "vm:101",
        ],
        nodes: {
            node1: 2,
            node2: 1,
            node3: 1,
        },
        strict: false,
    });
    // Resource Affinity Rule (Positive): keep resources together on the same node.
    const keepTogether = new proxmoxve.Harule("keep_together", {
        rule: "db-cluster-together",
        type: "resource-affinity",
        comment: "Keep database replicas on the same node",
        resources: [
            "vm:200",
            "vm:201",
        ],
        affinity: "positive",
    });
    // Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
    // separate nodes for high availability.
    const keepApart = new proxmoxve.Harule("keep_apart", {
        rule: "db-cluster-apart",
        type: "resource-affinity",
        comment: "Spread database replicas across nodes",
        resources: [
            "vm:200",
            "vm:201",
            "vm:202",
        ],
        affinity: "negative",
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    # Node Affinity Rule: assign VMs to preferred nodes with priorities.
    # Non-strict rules allow failover to other nodes; strict rules do not.
    prefer_node1 = proxmoxve.Harule("prefer_node1",
        rule="prefer-node1",
        type="node-affinity",
        comment="Prefer node1 for these VMs",
        resources=[
            "vm:100",
            "vm:101",
        ],
        nodes={
            "node1": 2,
            "node2": 1,
            "node3": 1,
        },
        strict=False)
    # Resource Affinity Rule (Positive): keep resources together on the same node.
    keep_together = proxmoxve.Harule("keep_together",
        rule="db-cluster-together",
        type="resource-affinity",
        comment="Keep database replicas on the same node",
        resources=[
            "vm:200",
            "vm:201",
        ],
        affinity="positive")
    # Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
    # separate nodes for high availability.
    keep_apart = proxmoxve.Harule("keep_apart",
        rule="db-cluster-apart",
        type="resource-affinity",
        comment="Spread database replicas across nodes",
        resources=[
            "vm:200",
            "vm:201",
            "vm:202",
        ],
        affinity="negative")
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Node Affinity Rule: assign VMs to preferred nodes with priorities.
    		// Non-strict rules allow failover to other nodes; strict rules do not.
    		_, err := proxmoxve.NewHarule(ctx, "prefer_node1", &proxmoxve.HaruleArgs{
    			Rule:    pulumi.String("prefer-node1"),
    			Type:    pulumi.String("node-affinity"),
    			Comment: pulumi.String("Prefer node1 for these VMs"),
    			Resources: pulumi.StringArray{
    				pulumi.String("vm:100"),
    				pulumi.String("vm:101"),
    			},
    			Nodes: pulumi.IntMap{
    				"node1": pulumi.Int(2),
    				"node2": pulumi.Int(1),
    				"node3": pulumi.Int(1),
    			},
    			Strict: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// Resource Affinity Rule (Positive): keep resources together on the same node.
    		_, err = proxmoxve.NewHarule(ctx, "keep_together", &proxmoxve.HaruleArgs{
    			Rule:    pulumi.String("db-cluster-together"),
    			Type:    pulumi.String("resource-affinity"),
    			Comment: pulumi.String("Keep database replicas on the same node"),
    			Resources: pulumi.StringArray{
    				pulumi.String("vm:200"),
    				pulumi.String("vm:201"),
    			},
    			Affinity: pulumi.String("positive"),
    		})
    		if err != nil {
    			return err
    		}
    		// Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
    		// separate nodes for high availability.
    		_, err = proxmoxve.NewHarule(ctx, "keep_apart", &proxmoxve.HaruleArgs{
    			Rule:    pulumi.String("db-cluster-apart"),
    			Type:    pulumi.String("resource-affinity"),
    			Comment: pulumi.String("Spread database replicas across nodes"),
    			Resources: pulumi.StringArray{
    				pulumi.String("vm:200"),
    				pulumi.String("vm:201"),
    				pulumi.String("vm:202"),
    			},
    			Affinity: pulumi.String("negative"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        // Node Affinity Rule: assign VMs to preferred nodes with priorities.
        // Non-strict rules allow failover to other nodes; strict rules do not.
        var preferNode1 = new ProxmoxVE.Index.Harule("prefer_node1", new()
        {
            Rule = "prefer-node1",
            Type = "node-affinity",
            Comment = "Prefer node1 for these VMs",
            Resources = new[]
            {
                "vm:100",
                "vm:101",
            },
            Nodes = 
            {
                { "node1", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(2) (example.pp:9,13-14)) },
                { "node2", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(1) (example.pp:11,13-14)) },
                { "node3", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(1) (example.pp:12,13-14)) },
            },
            Strict = false,
        });
    
        // Resource Affinity Rule (Positive): keep resources together on the same node.
        var keepTogether = new ProxmoxVE.Index.Harule("keep_together", new()
        {
            Rule = "db-cluster-together",
            Type = "resource-affinity",
            Comment = "Keep database replicas on the same node",
            Resources = new[]
            {
                "vm:200",
                "vm:201",
            },
            Affinity = "positive",
        });
    
        // Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
        // separate nodes for high availability.
        var keepApart = new ProxmoxVE.Index.Harule("keep_apart", new()
        {
            Rule = "db-cluster-apart",
            Type = "resource-affinity",
            Comment = "Spread database replicas across nodes",
            Resources = new[]
            {
                "vm:200",
                "vm:201",
                "vm:202",
            },
            Affinity = "negative",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import io.muehlbachler.pulumi.proxmoxve.Harule;
    import io.muehlbachler.pulumi.proxmoxve.HaruleArgs;
    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) {
            // Node Affinity Rule: assign VMs to preferred nodes with priorities.
            // Non-strict rules allow failover to other nodes; strict rules do not.
            var preferNode1 = new Harule("preferNode1", HaruleArgs.builder()
                .rule("prefer-node1")
                .type("node-affinity")
                .comment("Prefer node1 for these VMs")
                .resources(            
                    "vm:100",
                    "vm:101")
                .nodes(Map.ofEntries(
                    Map.entry("node1", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(2) (example.pp:9,13-14))),
                    Map.entry("node2", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(1) (example.pp:11,13-14))),
                    Map.entry("node3", %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(1) (example.pp:12,13-14)))
                ))
                .strict(false)
                .build());
    
            // Resource Affinity Rule (Positive): keep resources together on the same node.
            var keepTogether = new Harule("keepTogether", HaruleArgs.builder()
                .rule("db-cluster-together")
                .type("resource-affinity")
                .comment("Keep database replicas on the same node")
                .resources(            
                    "vm:200",
                    "vm:201")
                .affinity("positive")
                .build());
    
            // Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
            // separate nodes for high availability.
            var keepApart = new Harule("keepApart", HaruleArgs.builder()
                .rule("db-cluster-apart")
                .type("resource-affinity")
                .comment("Spread database replicas across nodes")
                .resources(            
                    "vm:200",
                    "vm:201",
                    "vm:202")
                .affinity("negative")
                .build());
    
        }
    }
    
    resources:
      # Node Affinity Rule: assign VMs to preferred nodes with priorities.
      # Non-strict rules allow failover to other nodes; strict rules do not.
      preferNode1:
        type: proxmoxve:Harule
        name: prefer_node1
        properties:
          rule: prefer-node1
          type: node-affinity
          comment: Prefer node1 for these VMs
          resources:
            - vm:100
            - vm:101
          nodes:
            node1: 2
            node2: 1
            node3: 1
          strict: false
      # Resource Affinity Rule (Positive): keep resources together on the same node.
      keepTogether:
        type: proxmoxve:Harule
        name: keep_together
        properties:
          rule: db-cluster-together
          type: resource-affinity
          comment: Keep database replicas on the same node
          resources:
            - vm:200
            - vm:201
          affinity: positive
      # Resource Affinity Rule (Negative / Anti-Affinity): keep resources on
      # separate nodes for high availability.
      keepApart:
        type: proxmoxve:Harule
        name: keep_apart
        properties:
          rule: db-cluster-apart
          type: resource-affinity
          comment: Spread database replicas across nodes
          resources:
            - vm:200
            - vm:201
            - vm:202
          affinity: negative
    

    Create Harule Resource

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

    Constructor syntax

    new Harule(name: string, args: HaruleArgs, opts?: CustomResourceOptions);
    @overload
    def Harule(resource_name: str,
               args: HaruleArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Harule(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               resources: Optional[Sequence[str]] = None,
               rule: Optional[str] = None,
               type: Optional[str] = None,
               affinity: Optional[str] = None,
               comment: Optional[str] = None,
               disable: Optional[bool] = None,
               nodes: Optional[Mapping[str, int]] = None,
               strict: Optional[bool] = None)
    func NewHarule(ctx *Context, name string, args HaruleArgs, opts ...ResourceOption) (*Harule, error)
    public Harule(string name, HaruleArgs args, CustomResourceOptions? opts = null)
    public Harule(String name, HaruleArgs args)
    public Harule(String name, HaruleArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Harule
    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 HaruleArgs
    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 HaruleArgs
    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 HaruleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HaruleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HaruleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Harule 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 Harule resource accepts the following input properties:

    Resources List<string>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    Rule string
    The identifier of the High Availability rule to manage.
    Type string
    The HA rule type. Must be node-affinity or resource-affinity.
    Affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    Comment string
    The comment associated with this rule.
    Disable bool
    Whether the HA rule is disabled. Defaults to false.
    Nodes Dictionary<string, int>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    Strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    Resources []string
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    Rule string
    The identifier of the High Availability rule to manage.
    Type string
    The HA rule type. Must be node-affinity or resource-affinity.
    Affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    Comment string
    The comment associated with this rule.
    Disable bool
    Whether the HA rule is disabled. Defaults to false.
    Nodes map[string]int
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    Strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    resources List<String>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule String
    The identifier of the High Availability rule to manage.
    type String
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity String
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment String
    The comment associated with this rule.
    disable Boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes Map<String,Integer>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    strict Boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    resources string[]
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule string
    The identifier of the High Availability rule to manage.
    type string
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment string
    The comment associated with this rule.
    disable boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes {[key: string]: number}
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    strict boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    resources Sequence[str]
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule str
    The identifier of the High Availability rule to manage.
    type str
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity str
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment str
    The comment associated with this rule.
    disable bool
    Whether the HA rule is disabled. Defaults to false.
    nodes Mapping[str, int]
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    resources List<String>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule String
    The identifier of the High Availability rule to manage.
    type String
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity String
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment String
    The comment associated with this rule.
    disable Boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes Map<Number>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    strict Boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Harule 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 Harule Resource

    Get an existing Harule 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?: HaruleState, opts?: CustomResourceOptions): Harule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            affinity: Optional[str] = None,
            comment: Optional[str] = None,
            disable: Optional[bool] = None,
            nodes: Optional[Mapping[str, int]] = None,
            resources: Optional[Sequence[str]] = None,
            rule: Optional[str] = None,
            strict: Optional[bool] = None,
            type: Optional[str] = None) -> Harule
    func GetHarule(ctx *Context, name string, id IDInput, state *HaruleState, opts ...ResourceOption) (*Harule, error)
    public static Harule Get(string name, Input<string> id, HaruleState? state, CustomResourceOptions? opts = null)
    public static Harule get(String name, Output<String> id, HaruleState state, CustomResourceOptions options)
    resources:  _:    type: proxmoxve:Harule    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:
    Affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    Comment string
    The comment associated with this rule.
    Disable bool
    Whether the HA rule is disabled. Defaults to false.
    Nodes Dictionary<string, int>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    Resources List<string>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    Rule string
    The identifier of the High Availability rule to manage.
    Strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    Type string
    The HA rule type. Must be node-affinity or resource-affinity.
    Affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    Comment string
    The comment associated with this rule.
    Disable bool
    Whether the HA rule is disabled. Defaults to false.
    Nodes map[string]int
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    Resources []string
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    Rule string
    The identifier of the High Availability rule to manage.
    Strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    Type string
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity String
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment String
    The comment associated with this rule.
    disable Boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes Map<String,Integer>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    resources List<String>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule String
    The identifier of the High Availability rule to manage.
    strict Boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    type String
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity string
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment string
    The comment associated with this rule.
    disable boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes {[key: string]: number}
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    resources string[]
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule string
    The identifier of the High Availability rule to manage.
    strict boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    type string
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity str
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment str
    The comment associated with this rule.
    disable bool
    Whether the HA rule is disabled. Defaults to false.
    nodes Mapping[str, int]
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    resources Sequence[str]
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule str
    The identifier of the High Availability rule to manage.
    strict bool
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    type str
    The HA rule type. Must be node-affinity or resource-affinity.
    affinity String
    The resource affinity type (resource-affinity only). positive keeps resources on the same node, negative keeps them on separate nodes.
    comment String
    The comment associated with this rule.
    disable Boolean
    Whether the HA rule is disabled. Defaults to false.
    nodes Map<Number>
    The member nodes for this rule (node-affinity only). They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or null for unset priorities.
    resources List<String>
    The set of HA resource IDs that this rule applies to (e.g. vm:100, ct:101). The resources must already be managed by HA.
    rule String
    The identifier of the High Availability rule to manage.
    strict Boolean
    Whether the node affinity rule is strict (node-affinity only). When strict, resources cannot run on nodes not listed. Defaults to false.
    type String
    The HA rule type. Must be node-affinity or resource-affinity.

    Import

    !/usr/bin/env sh HA rules can be imported using their name, e.g.:

    $ pulumi import proxmoxve:index/harule:Harule example prefer-node1
    

    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
    Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
    published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
      Try Pulumi Cloud free. Your team will thank you.