published on Wednesday, Jul 8, 2026 by Pulumiverse
published on Wednesday, Jul 8, 2026 by Pulumiverse
The unifi.firewall.ZonePolicyOrder resource controls the ordering of the custom unifi.firewall.ZonePolicy policies within a single source > destination zone pair.
This resource manages the relative order of ONLY the custom policies listed in beforePredefinedIds and afterPredefinedIds within the zone pair. Any other (unlisted) custom policies in the same zone pair are left untouched and ignored — they are neither reordered by this resource nor surfaced in its state.
Policies are evaluated top-to-bottom; the order within each list is significant. Policies listed in beforePredefinedIds run BEFORE the controller’s predefined (built-in) policies for the zone pair, and policies listed in afterPredefinedIds run AFTER them. At least one of the two lists must be set; prefer OMITTING an unused list over setting it to an empty list ([]).
Because index on unifi.firewall.ZonePolicy is controller-assigned and read-only, this resource is the supported way to make per-zone-pair policy order deterministic. Use dependsOn to ensure the referenced policies exist before this resource is applied.
Deleting this resource does NOT change the order on the controller; it only stops Terraform from managing the ordering for the zone pair.
This is experimental feature, that requires UniFi OS 9.0.0 or later and Zone Based Firewall feature enabled. Check official documentation how to migrate to Zone-Based firewalls.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as unifi from "@pulumiverse/unifi";
const network = new unifi.Network("network", {
name: "my-network",
purpose: "corporate",
subnet: "10.0.10.0/24",
vlanId: 400,
});
const src = new unifi.firewall.Zone("src", {
name: "my-source-zone",
networks: [network.id],
});
const dst = new unifi.firewall.Zone("dst", {name: "my-destination-zone"});
const allowWeb = new unifi.firewall.ZonePolicy("allow_web", {
name: "allow-web",
action: "ALLOW",
protocol: "tcp_udp",
source: {
zoneId: src.id,
},
destination: {
zoneId: dst.id,
},
});
const blockRest = new unifi.firewall.ZonePolicy("block_rest", {
name: "block-rest",
action: "BLOCK",
protocol: "all",
source: {
zoneId: src.id,
},
destination: {
zoneId: dst.id,
},
});
// Control the evaluation order of the custom policies in the src -> dst zone pair.
// `allow_web` runs before the predefined policies; `block_rest` runs after them.
// Order within each list is significant.
const order = new unifi.firewall.ZonePolicyOrder("order", {
sourceZoneId: src.id,
destinationZoneId: dst.id,
beforePredefinedIds: [allowWeb.id],
afterPredefinedIds: [blockRest.id],
});
import pulumi
import pulumiverse_unifi as unifi
network = unifi.Network("network",
name="my-network",
purpose="corporate",
subnet="10.0.10.0/24",
vlan_id=400)
src = unifi.firewall.Zone("src",
name="my-source-zone",
networks=[network.id])
dst = unifi.firewall.Zone("dst", name="my-destination-zone")
allow_web = unifi.firewall.ZonePolicy("allow_web",
name="allow-web",
action="ALLOW",
protocol="tcp_udp",
source={
"zone_id": src.id,
},
destination={
"zone_id": dst.id,
})
block_rest = unifi.firewall.ZonePolicy("block_rest",
name="block-rest",
action="BLOCK",
protocol="all",
source={
"zone_id": src.id,
},
destination={
"zone_id": dst.id,
})
# Control the evaluation order of the custom policies in the src -> dst zone pair.
# `allow_web` runs before the predefined policies; `block_rest` runs after them.
# Order within each list is significant.
order = unifi.firewall.ZonePolicyOrder("order",
source_zone_id=src.id,
destination_zone_id=dst.id,
before_predefined_ids=[allow_web.id],
after_predefined_ids=[block_rest.id])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi"
"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/firewall"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network, err := unifi.NewNetwork(ctx, "network", &unifi.NetworkArgs{
Name: pulumi.String("my-network"),
Purpose: pulumi.String("corporate"),
Subnet: pulumi.String("10.0.10.0/24"),
VlanId: pulumi.Int(400),
})
if err != nil {
return err
}
src, err := firewall.NewZone(ctx, "src", &firewall.ZoneArgs{
Name: pulumi.String("my-source-zone"),
Networks: pulumi.StringArray{
network.ID(),
},
})
if err != nil {
return err
}
dst, err := firewall.NewZone(ctx, "dst", &firewall.ZoneArgs{
Name: pulumi.String("my-destination-zone"),
})
if err != nil {
return err
}
allowWeb, err := firewall.NewZonePolicy(ctx, "allow_web", &firewall.ZonePolicyArgs{
Name: pulumi.String("allow-web"),
Action: pulumi.String("ALLOW"),
Protocol: pulumi.String("tcp_udp"),
Source: &firewall.ZonePolicySourceArgs{
ZoneId: src.ID(),
},
Destination: &firewall.ZonePolicyDestinationArgs{
ZoneId: dst.ID(),
},
})
if err != nil {
return err
}
blockRest, err := firewall.NewZonePolicy(ctx, "block_rest", &firewall.ZonePolicyArgs{
Name: pulumi.String("block-rest"),
Action: pulumi.String("BLOCK"),
Protocol: pulumi.String("all"),
Source: &firewall.ZonePolicySourceArgs{
ZoneId: src.ID(),
},
Destination: &firewall.ZonePolicyDestinationArgs{
ZoneId: dst.ID(),
},
})
if err != nil {
return err
}
// Control the evaluation order of the custom policies in the src -> dst zone pair.
// `allow_web` runs before the predefined policies; `block_rest` runs after them.
// Order within each list is significant.
_, err = firewall.NewZonePolicyOrder(ctx, "order", &firewall.ZonePolicyOrderArgs{
SourceZoneId: src.ID(),
DestinationZoneId: dst.ID(),
BeforePredefinedIds: pulumi.StringArray{
allowWeb.ID(),
},
AfterPredefinedIds: pulumi.StringArray{
blockRest.ID(),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Unifi = Pulumiverse.Unifi;
return await Deployment.RunAsync(() =>
{
var network = new Unifi.Network("network", new()
{
Name = "my-network",
Purpose = "corporate",
Subnet = "10.0.10.0/24",
VlanId = 400,
});
var src = new Unifi.Firewall.Zone("src", new()
{
Name = "my-source-zone",
Networks = new[]
{
network.Id,
},
});
var dst = new Unifi.Firewall.Zone("dst", new()
{
Name = "my-destination-zone",
});
var allowWeb = new Unifi.Firewall.ZonePolicy("allow_web", new()
{
Name = "allow-web",
Action = "ALLOW",
Protocol = "tcp_udp",
Source = new Unifi.Firewall.Inputs.ZonePolicySourceArgs
{
ZoneId = src.Id,
},
Destination = new Unifi.Firewall.Inputs.ZonePolicyDestinationArgs
{
ZoneId = dst.Id,
},
});
var blockRest = new Unifi.Firewall.ZonePolicy("block_rest", new()
{
Name = "block-rest",
Action = "BLOCK",
Protocol = "all",
Source = new Unifi.Firewall.Inputs.ZonePolicySourceArgs
{
ZoneId = src.Id,
},
Destination = new Unifi.Firewall.Inputs.ZonePolicyDestinationArgs
{
ZoneId = dst.Id,
},
});
// Control the evaluation order of the custom policies in the src -> dst zone pair.
// `allow_web` runs before the predefined policies; `block_rest` runs after them.
// Order within each list is significant.
var order = new Unifi.Firewall.ZonePolicyOrder("order", new()
{
SourceZoneId = src.Id,
DestinationZoneId = dst.Id,
BeforePredefinedIds = new[]
{
allowWeb.Id,
},
AfterPredefinedIds = new[]
{
blockRest.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumiverse.unifi.Network;
import com.pulumiverse.unifi.NetworkArgs;
import com.pulumiverse.unifi.firewall.Zone;
import com.pulumiverse.unifi.firewall.ZoneArgs;
import com.pulumiverse.unifi.firewall.ZonePolicy;
import com.pulumiverse.unifi.firewall.ZonePolicyArgs;
import com.pulumi.unifi.firewall.inputs.ZonePolicySourceArgs;
import com.pulumi.unifi.firewall.inputs.ZonePolicyDestinationArgs;
import com.pulumiverse.unifi.firewall.ZonePolicyOrder;
import com.pulumiverse.unifi.firewall.ZonePolicyOrderArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 network = new Network("network", NetworkArgs.builder()
.name("my-network")
.purpose("corporate")
.subnet("10.0.10.0/24")
.vlanId(400)
.build());
var src = new Zone("src", ZoneArgs.builder()
.name("my-source-zone")
.networks(network.id())
.build());
var dst = new Zone("dst", ZoneArgs.builder()
.name("my-destination-zone")
.build());
var allowWeb = new ZonePolicy("allowWeb", ZonePolicyArgs.builder()
.name("allow-web")
.action("ALLOW")
.protocol("tcp_udp")
.source(ZonePolicySourceArgs.builder()
.zoneId(src.id())
.build())
.destination(ZonePolicyDestinationArgs.builder()
.zoneId(dst.id())
.build())
.build());
var blockRest = new ZonePolicy("blockRest", ZonePolicyArgs.builder()
.name("block-rest")
.action("BLOCK")
.protocol("all")
.source(ZonePolicySourceArgs.builder()
.zoneId(src.id())
.build())
.destination(ZonePolicyDestinationArgs.builder()
.zoneId(dst.id())
.build())
.build());
// Control the evaluation order of the custom policies in the src -> dst zone pair.
// `allow_web` runs before the predefined policies; `block_rest` runs after them.
// Order within each list is significant.
var order = new ZonePolicyOrder("order", ZonePolicyOrderArgs.builder()
.sourceZoneId(src.id())
.destinationZoneId(dst.id())
.beforePredefinedIds(allowWeb.id())
.afterPredefinedIds(blockRest.id())
.build());
}
}
resources:
network:
type: unifi:Network
properties:
name: my-network
purpose: corporate
subnet: 10.0.10.0/24
vlanId: '400'
src:
type: unifi:firewall:Zone
properties:
name: my-source-zone
networks:
- ${network.id}
dst:
type: unifi:firewall:Zone
properties:
name: my-destination-zone
allowWeb:
type: unifi:firewall:ZonePolicy
name: allow_web
properties:
name: allow-web
action: ALLOW
protocol: tcp_udp
source:
zoneId: ${src.id}
destination:
zoneId: ${dst.id}
blockRest:
type: unifi:firewall:ZonePolicy
name: block_rest
properties:
name: block-rest
action: BLOCK
protocol: all
source:
zoneId: ${src.id}
destination:
zoneId: ${dst.id}
# Control the evaluation order of the custom policies in the src -> dst zone pair.
# `allow_web` runs before the predefined policies; `block_rest` runs after them.
# Order within each list is significant.
order:
type: unifi:firewall:ZonePolicyOrder
properties:
sourceZoneId: ${src.id}
destinationZoneId: ${dst.id}
beforePredefinedIds:
- ${allowWeb.id}
afterPredefinedIds:
- ${blockRest.id}
pulumi {
required_providers {
unifi = {
source = "pulumi/unifi"
}
}
}
resource "unifi_network" "network" {
name = "my-network"
purpose = "corporate"
subnet = "10.0.10.0/24"
vlan_id = "400"
}
resource "unifi_firewall_zone" "src" {
name = "my-source-zone"
networks = [unifi_network.network.id]
}
resource "unifi_firewall_zone" "dst" {
name = "my-destination-zone"
}
resource "unifi_firewall_zonepolicy" "allow_web" {
name = "allow-web"
action = "ALLOW"
protocol = "tcp_udp"
source = {
zone_id = unifi_firewall_zone.src.id
}
destination = {
zone_id = unifi_firewall_zone.dst.id
}
}
resource "unifi_firewall_zonepolicy" "block_rest" {
name = "block-rest"
action = "BLOCK"
protocol = "all"
source = {
zone_id = unifi_firewall_zone.src.id
}
destination = {
zone_id = unifi_firewall_zone.dst.id
}
}
# Control the evaluation order of the custom policies in the src -> dst zone pair.
# `allow_web` runs before the predefined policies; `block_rest` runs after them.
# Order within each list is significant.
resource "unifi_firewall_zonepolicyorder" "order" {
source_zone_id = unifi_firewall_zone.src.id
destination_zone_id = unifi_firewall_zone.dst.id
before_predefined_ids = [unifi_firewall_zonepolicy.allow_web.id]
after_predefined_ids = [unifi_firewall_zonepolicy.block_rest.id]
}
Create ZonePolicyOrder Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZonePolicyOrder(name: string, args: ZonePolicyOrderArgs, opts?: CustomResourceOptions);@overload
def ZonePolicyOrder(resource_name: str,
args: ZonePolicyOrderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZonePolicyOrder(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_zone_id: Optional[str] = None,
source_zone_id: Optional[str] = None,
after_predefined_ids: Optional[Sequence[str]] = None,
before_predefined_ids: Optional[Sequence[str]] = None,
site: Optional[str] = None)func NewZonePolicyOrder(ctx *Context, name string, args ZonePolicyOrderArgs, opts ...ResourceOption) (*ZonePolicyOrder, error)public ZonePolicyOrder(string name, ZonePolicyOrderArgs args, CustomResourceOptions? opts = null)
public ZonePolicyOrder(String name, ZonePolicyOrderArgs args)
public ZonePolicyOrder(String name, ZonePolicyOrderArgs args, CustomResourceOptions options)
type: unifi:firewall:ZonePolicyOrder
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "unifi_firewall_zonepolicyorder" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ZonePolicyOrderArgs
- 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 ZonePolicyOrderArgs
- 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 ZonePolicyOrderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZonePolicyOrderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZonePolicyOrderArgs
- 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 zonePolicyOrderResource = new Unifi.Firewall.ZonePolicyOrder("zonePolicyOrderResource", new()
{
DestinationZoneId = "string",
SourceZoneId = "string",
AfterPredefinedIds = new[]
{
"string",
},
BeforePredefinedIds = new[]
{
"string",
},
Site = "string",
});
example, err := firewall.NewZonePolicyOrder(ctx, "zonePolicyOrderResource", &firewall.ZonePolicyOrderArgs{
DestinationZoneId: pulumi.String("string"),
SourceZoneId: pulumi.String("string"),
AfterPredefinedIds: pulumi.StringArray{
pulumi.String("string"),
},
BeforePredefinedIds: pulumi.StringArray{
pulumi.String("string"),
},
Site: pulumi.String("string"),
})
resource "unifi_firewall_zonepolicyorder" "zonePolicyOrderResource" {
destination_zone_id = "string"
source_zone_id = "string"
after_predefined_ids = ["string"]
before_predefined_ids = ["string"]
site = "string"
}
var zonePolicyOrderResource = new ZonePolicyOrder("zonePolicyOrderResource", ZonePolicyOrderArgs.builder()
.destinationZoneId("string")
.sourceZoneId("string")
.afterPredefinedIds("string")
.beforePredefinedIds("string")
.site("string")
.build());
zone_policy_order_resource = unifi.firewall.ZonePolicyOrder("zonePolicyOrderResource",
destination_zone_id="string",
source_zone_id="string",
after_predefined_ids=["string"],
before_predefined_ids=["string"],
site="string")
const zonePolicyOrderResource = new unifi.firewall.ZonePolicyOrder("zonePolicyOrderResource", {
destinationZoneId: "string",
sourceZoneId: "string",
afterPredefinedIds: ["string"],
beforePredefinedIds: ["string"],
site: "string",
});
type: unifi:firewall:ZonePolicyOrder
properties:
afterPredefinedIds:
- string
beforePredefinedIds:
- string
destinationZoneId: string
site: string
sourceZoneId: string
ZonePolicyOrder 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 ZonePolicyOrder resource accepts the following input properties:
- Destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- Source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- After
Predefined List<string>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Before
Predefined List<string>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- Destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- Source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- After
Predefined []stringIds - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Before
Predefined []stringIds - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- destination_
zone_ stringid - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- source_
zone_ stringid - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after_
predefined_ list(string)ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before_
predefined_ list(string)ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- destination
Zone StringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- source
Zone StringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined string[]Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined string[]Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- destination_
zone_ strid - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- source_
zone_ strid - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after_
predefined_ Sequence[str]ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before_
predefined_ Sequence[str]ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - site str
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- destination
Zone StringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- source
Zone StringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZonePolicyOrder 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 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 ZonePolicyOrder Resource
Get an existing ZonePolicyOrder 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?: ZonePolicyOrderState, opts?: CustomResourceOptions): ZonePolicyOrder@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
after_predefined_ids: Optional[Sequence[str]] = None,
before_predefined_ids: Optional[Sequence[str]] = None,
destination_zone_id: Optional[str] = None,
site: Optional[str] = None,
source_zone_id: Optional[str] = None) -> ZonePolicyOrderfunc GetZonePolicyOrder(ctx *Context, name string, id IDInput, state *ZonePolicyOrderState, opts ...ResourceOption) (*ZonePolicyOrder, error)public static ZonePolicyOrder Get(string name, Input<string> id, ZonePolicyOrderState? state, CustomResourceOptions? opts = null)public static ZonePolicyOrder get(String name, Output<String> id, ZonePolicyOrderState state, CustomResourceOptions options)resources: _: type: unifi:firewall:ZonePolicyOrder get: id: ${id}import {
to = unifi_firewall_zonepolicyorder.example
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.
- After
Predefined List<string>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Before
Predefined List<string>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- Source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- After
Predefined []stringIds - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Before
Predefined []stringIds - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - Destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- Source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after_
predefined_ list(string)ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before_
predefined_ list(string)ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - destination_
zone_ stringid - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- source_
zone_ stringid - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - destination
Zone StringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- source
Zone StringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined string[]Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined string[]Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - destination
Zone stringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- source
Zone stringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after_
predefined_ Sequence[str]ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before_
predefined_ Sequence[str]ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - destination_
zone_ strid - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- site str
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- source_
zone_ strid - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- after
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run AFTER the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - before
Predefined List<String>Ids - Ordered IDs of custom
unifi.firewall.ZonePolicypolicies that run BEFORE the predefined (built-in) policies for this zone pair. Order within the list is significant. Omit this attribute when it is unused rather than setting it to an empty list ([]). - destination
Zone StringId - ID of the destination firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
- site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- source
Zone StringId - ID of the source firewall zone of the pair whose policy order is managed. Changing the zone pair forces a new resource.
Import
The pulumi import command can be used, for example:
import the policy order for a zone pair:
$ pulumi import unifi:firewall/zonePolicyOrder:ZonePolicyOrder order default:5dc28e5e9106d105bdc87217:5dc28e5e9106d105bdc87218
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- unifi pulumiverse/pulumi-unifi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
unifiTerraform Provider.
published on Wednesday, Jul 8, 2026 by Pulumiverse