1. Packages
  2. Unifi
  3. API Docs
  4. firewall
  5. Group
Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse
unifi logo
Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse

    The unifi.firewall.Group resource manages reusable groups of addresses or ports that can be referenced in firewall rules (unifi.firewall.Rule).

    Firewall groups help organize and simplify firewall rule management by allowing you to:

    • Create collections of IP addresses or networks
    • Define sets of ports for specific services
    • Group IPv6 addresses for IPv6-specific rules

    Common use cases include:

    • Creating groups of trusted IP addresses
    • Defining port groups for specific applications
    • Managing access control lists
    • Simplifying rule maintenance by using groups instead of individual IPs/ports

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const config = new pulumi.Config();
    const laptopIps = config.requireObject<Array<string>>("laptopIps");
    const canPrint = new unifi.firewall.Group("can_print", {
        name: "can-print",
        type: "address-group",
        members: laptopIps,
    });
    
    import pulumi
    import pulumiverse_unifi as unifi
    
    config = pulumi.Config()
    laptop_ips = config.require_object("laptopIps")
    can_print = unifi.firewall.Group("can_print",
        name="can-print",
        type="address-group",
        members=laptop_ips)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/firewall"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		laptopIps := cfg.Require("laptopIps")
    		_, err := firewall.NewGroup(ctx, "can_print", &firewall.GroupArgs{
    			Name:    pulumi.String("can-print"),
    			Type:    pulumi.String("address-group"),
    			Members: laptopIps,
    		})
    		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 config = new Config();
        var laptopIps = config.RequireObject<string[]>("laptopIps");
        var canPrint = new Unifi.Firewall.Group("can_print", new()
        {
            Name = "can-print",
            Type = "address-group",
            Members = laptopIps,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.unifi.firewall.Group;
    import com.pulumiverse.unifi.firewall.GroupArgs;
    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) {
            final var config = ctx.config();
            final var laptopIps = config.require("laptopIps");
            var canPrint = new Group("canPrint", GroupArgs.builder()
                .name("can-print")
                .type("address-group")
                .members(laptopIps)
                .build());
    
        }
    }
    
    configuration:
      laptopIps:
        type: list(string)
    resources:
      canPrint:
        type: unifi:firewall:Group
        name: can_print
        properties:
          name: can-print
          type: address-group
          members: ${laptopIps}
    

    Create Group Resource

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

    Constructor syntax

    new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
    @overload
    def Group(resource_name: str,
              args: GroupArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Group(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              members: Optional[Sequence[str]] = None,
              type: Optional[str] = None,
              name: Optional[str] = None,
              site: Optional[str] = None)
    func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
    public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
    public Group(String name, GroupArgs args)
    public Group(String name, GroupArgs args, CustomResourceOptions options)
    
    type: unifi:firewall:Group
    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 GroupArgs
    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 GroupArgs
    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 GroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupArgs
    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 groupResource = new Unifi.Firewall.Group("groupResource", new()
    {
        Members = new[]
        {
            "string",
        },
        Type = "string",
        Name = "string",
        Site = "string",
    });
    
    example, err := firewall.NewGroup(ctx, "groupResource", &firewall.GroupArgs{
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    	Name: pulumi.String("string"),
    	Site: pulumi.String("string"),
    })
    
    var groupResource = new com.pulumiverse.unifi.firewall.Group("groupResource", com.pulumiverse.unifi.firewall.GroupArgs.builder()
        .members("string")
        .type("string")
        .name("string")
        .site("string")
        .build());
    
    group_resource = unifi.firewall.Group("groupResource",
        members=["string"],
        type="string",
        name="string",
        site="string")
    
    const groupResource = new unifi.firewall.Group("groupResource", {
        members: ["string"],
        type: "string",
        name: "string",
        site: "string",
    });
    
    type: unifi:firewall:Group
    properties:
        members:
            - string
        name: string
        site: string
        type: string
    

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

    Members List<string>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    Type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    Name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    Site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    Members []string
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    Type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    Name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    Site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    members List<String>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    type String
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    name String
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site String
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    members string[]
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    members Sequence[str]
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    type str
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    name str
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site str
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    members List<String>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    type String
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    name String
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site String
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.

    Outputs

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

    Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            members: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            site: Optional[str] = None,
            type: Optional[str] = None) -> Group
    func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
    public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
    public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
    resources:  _:    type: unifi:firewall:Group    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:
    Members List<string>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    Name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    Site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    Type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    Members []string
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    Name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    Site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    Type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    members List<String>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    name String
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site String
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    type String
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    members string[]
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    name string
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site string
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    type string
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    members Sequence[str]
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    name str
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site str
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    type str
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks
    members List<String>
    List of members in the group. The format depends on the group type:

    • For address-group: IPv4 addresses or CIDR notation (e.g., ['192.168.1.10', '10.0.0.0/8'])
    • For port-group: Port numbers or ranges (e.g., ['80', '443', '8000-8080'])
    • For ipv6-address-group: IPv6 addresses or CIDR notation
    name String
    A friendly name for the firewall group to help identify its purpose (e.g., 'Trusted IPs' or 'Web Server Ports'). Must be unique within the site.
    site String
    The name of the UniFi site where the firewall group should be created. If not specified, the default site will be used.
    type String
    The type of firewall group. Valid values are:

    • address-group - Group of IPv4 addresses and/or networks (e.g., '192.168.1.10', '10.0.0.0/8')
    • port-group - Group of ports or port ranges (e.g., '80', '443', '8000-8080')
    • ipv6-address-group - Group of IPv6 addresses and/or networks

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse
      Meet Neo: Your AI Platform Teammate