1. Packages
  2. Unifi
  3. API Docs
  4. Site
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse
unifi logo
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse

    The unifi.Site resource manages UniFi sites, which are logical groupings of UniFi devices and their configurations.

    Sites in UniFi are used to:

    • Organize network devices and settings for different physical locations
    • Isolate configurations between different networks or customers
    • Apply different policies and configurations to different groups of devices

    Each site maintains its own:

    • Network configurations
    • Wireless networks (WLANs)
    • Security policies
    • Device configurations

    A UniFi controller can manage multiple sites, making it ideal for multi-tenant or distributed network deployments.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const mysite = new unifi.Site("mysite", {description: "mysite"});
    
    import pulumi
    import pulumiverse_unifi as unifi
    
    mysite = unifi.Site("mysite", description="mysite")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := unifi.NewSite(ctx, "mysite", &unifi.SiteArgs{
    			Description: pulumi.String("mysite"),
    		})
    		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 mysite = new Unifi.Site("mysite", new()
        {
            Description = "mysite",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.unifi.Site;
    import com.pulumiverse.unifi.SiteArgs;
    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 mysite = new Site("mysite", SiteArgs.builder()
                .description("mysite")
                .build());
    
        }
    }
    
    resources:
      mysite:
        type: unifi:Site
        properties:
          description: mysite
    

    Create Site Resource

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

    Constructor syntax

    new Site(name: string, args: SiteArgs, opts?: CustomResourceOptions);
    @overload
    def Site(resource_name: str,
             args: SiteArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Site(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             description: Optional[str] = None)
    func NewSite(ctx *Context, name string, args SiteArgs, opts ...ResourceOption) (*Site, error)
    public Site(string name, SiteArgs args, CustomResourceOptions? opts = null)
    public Site(String name, SiteArgs args)
    public Site(String name, SiteArgs args, CustomResourceOptions options)
    
    type: unifi:Site
    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 SiteArgs
    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 SiteArgs
    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 SiteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SiteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SiteArgs
    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 siteResource = new Unifi.Site("siteResource", new()
    {
        Description = "string",
    });
    
    example, err := unifi.NewSite(ctx, "siteResource", &unifi.SiteArgs{
    	Description: pulumi.String("string"),
    })
    
    var siteResource = new Site("siteResource", SiteArgs.builder()
        .description("string")
        .build());
    
    site_resource = unifi.Site("siteResource", description="string")
    
    const siteResource = new unifi.Site("siteResource", {description: "string"});
    
    type: unifi:Site
    properties:
        description: string
    

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

    Description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    Description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    description String
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    description str
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    description String
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Site resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.

    Look up Existing Site Resource

    Get an existing Site 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?: SiteState, opts?: CustomResourceOptions): Site
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None) -> Site
    func GetSite(ctx *Context, name string, id IDInput, state *SiteState, opts ...ResourceOption) (*Site, error)
    public static Site Get(string name, Input<string> id, SiteState? state, CustomResourceOptions? opts = null)
    public static Site get(String name, Output<String> id, SiteState state, CustomResourceOptions options)
    resources:  _:    type: unifi:Site    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:
    Description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    Name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    Description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    Name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    description String
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    name String
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    description string
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    name string
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    description str
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    name str
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.
    description String
    A human-readable description of the site (e.g., 'Main Office', 'Remote Branch', 'Client A Network'). This is used as the display name in the UniFi controller interface.
    name String
    The site's internal name in the UniFi system. This is automatically generated based on the description and is used in API calls and configurations. It's typically a lowercase, hyphenated version of the description.

    Import

    import using the API/UI ID

    $ pulumi import unifi:index/site:Site mysite 5fe6261995fe130013456a36
    

    import using the name (short ID)

    $ pulumi import unifi:index/site:Site mysite vq98kwez
    

    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 unifi Terraform Provider.
    unifi logo
    Viewing docs for Unifi v0.2.0
    published on Tuesday, Feb 17, 2026 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.