1. Registry
  2. Packages
  3. Unifi
  4. API Docs
  5. Device
Viewing docs for Unifi v0.3.0
published on Wednesday, Jul 8, 2026 by Pulumiverse
unifi logo
Viewing docs for Unifi v0.3.0
published on Wednesday, Jul 8, 2026 by Pulumiverse

    The unifi.Device resource manages UniFi network devices such as access points, switches, gateways, etc.

    Devices must first be adopted by the UniFi controller before they can be managed through Terraform. This resource cannot create new devices, but instead allows you to manage existing devices that have already been adopted. The recommended approach is to adopt devices through the UniFi controller UI first, then import them into Terraform using the device’s MAC address.

    This resource supports managing device names, port configurations, and other device-specific settings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const disabled = unifi.port.getProfile({
        name: "Disabled",
    });
    const poe = new unifi.port.Profile("poe", {
        name: "poe",
        forward: "customize",
        nativeNetworkconfId: nativeNetworkId,
        excludedNetworkIds: [someVlanNetworkId],
        poeMode: "auto",
    });
    const us24Poe = new unifi.Device("us_24_poe", {
        mac: "01:23:45:67:89:AB",
        name: "Switch with POE",
        portOverrides: [
            {
                number: 1,
                name: "port w/ poe",
                portProfileId: poe.id,
            },
            {
                number: 2,
                name: "disabled",
                portProfileId: disabled.then(disabled => disabled.id),
            },
            {
                number: 3,
                name: "access vlan",
                forward: "customize",
                nativeNetworkconfId: nativeNetworkId,
                settingPreference: "manual",
            },
            {
                number: 4,
                name: "trunk except guest",
                forward: "customize",
                taggedVlanMgmt: "custom",
                excludedNetworkIds: [someVlanNetworkId],
                settingPreference: "manual",
            },
            {
                number: 11,
                opMode: "aggregate",
                aggregateNumPorts: 2,
            },
        ],
    });
    
    import pulumi
    import pulumi_unifi as unifi
    import pulumiverse_unifi as unifi
    
    disabled = unifi.port.get_profile(name="Disabled")
    poe = unifi.port.Profile("poe",
        name="poe",
        forward="customize",
        native_networkconf_id=native_network_id,
        excluded_network_ids=[some_vlan_network_id],
        poe_mode="auto")
    us24_poe = unifi.Device("us_24_poe",
        mac="01:23:45:67:89:AB",
        name="Switch with POE",
        port_overrides=[
            {
                "number": 1,
                "name": "port w/ poe",
                "port_profile_id": poe.id,
            },
            {
                "number": 2,
                "name": "disabled",
                "port_profile_id": disabled.id,
            },
            {
                "number": 3,
                "name": "access vlan",
                "forward": "customize",
                "native_networkconf_id": native_network_id,
                "setting_preference": "manual",
            },
            {
                "number": 4,
                "name": "trunk except guest",
                "forward": "customize",
                "tagged_vlan_mgmt": "custom",
                "excluded_network_ids": [some_vlan_network_id],
                "setting_preference": "manual",
            },
            {
                "number": 11,
                "op_mode": "aggregate",
                "aggregate_num_ports": 2,
            },
        ])
    
    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/port"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		disabled, err := port.LookupProfile(ctx, &port.LookupProfileArgs{
    			Name: pulumi.StringRef("Disabled"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		poe, err := port.NewProfile(ctx, "poe", &port.ProfileArgs{
    			Name:                pulumi.String("poe"),
    			Forward:             pulumi.String("customize"),
    			NativeNetworkconfId: pulumi.Any(nativeNetworkId),
    			ExcludedNetworkIds: pulumi.StringArray{
    				someVlanNetworkId,
    			},
    			PoeMode: pulumi.String("auto"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = unifi.NewDevice(ctx, "us_24_poe", &unifi.DeviceArgs{
    			Mac:  pulumi.String("01:23:45:67:89:AB"),
    			Name: pulumi.String("Switch with POE"),
    			PortOverrides: unifi.DevicePortOverrideArray{
    				&unifi.DevicePortOverrideArgs{
    					Number:        pulumi.Int(1),
    					Name:          pulumi.String("port w/ poe"),
    					PortProfileId: poe.ID(),
    				},
    				&unifi.DevicePortOverrideArgs{
    					Number:        pulumi.Int(2),
    					Name:          pulumi.String("disabled"),
    					PortProfileId: pulumi.String(disabled.Id),
    				},
    				&unifi.DevicePortOverrideArgs{
    					Number:              pulumi.Int(3),
    					Name:                pulumi.String("access vlan"),
    					Forward:             pulumi.String("customize"),
    					NativeNetworkconfId: pulumi.Any(nativeNetworkId),
    					SettingPreference:   pulumi.String("manual"),
    				},
    				&unifi.DevicePortOverrideArgs{
    					Number:         pulumi.Int(4),
    					Name:           pulumi.String("trunk except guest"),
    					Forward:        pulumi.String("customize"),
    					TaggedVlanMgmt: pulumi.String("custom"),
    					ExcludedNetworkIds: pulumi.StringArray{
    						someVlanNetworkId,
    					},
    					SettingPreference: pulumi.String("manual"),
    				},
    				&unifi.DevicePortOverrideArgs{
    					Number:            pulumi.Int(11),
    					OpMode:            pulumi.String("aggregate"),
    					AggregateNumPorts: pulumi.Int(2),
    				},
    			},
    		})
    		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 disabled = Unifi.Port.GetProfile.Invoke(new()
        {
            Name = "Disabled",
        });
    
        var poe = new Unifi.Port.Profile("poe", new()
        {
            Name = "poe",
            Forward = "customize",
            NativeNetworkconfId = nativeNetworkId,
            ExcludedNetworkIds = new[]
            {
                someVlanNetworkId,
            },
            PoeMode = "auto",
        });
    
        var us24Poe = new Unifi.Device("us_24_poe", new()
        {
            Mac = "01:23:45:67:89:AB",
            Name = "Switch with POE",
            PortOverrides = new[]
            {
                new Unifi.Inputs.DevicePortOverrideArgs
                {
                    Number = 1,
                    Name = "port w/ poe",
                    PortProfileId = poe.Id,
                },
                new Unifi.Inputs.DevicePortOverrideArgs
                {
                    Number = 2,
                    Name = "disabled",
                    PortProfileId = disabled.Apply(getProfileResult => getProfileResult.Id),
                },
                new Unifi.Inputs.DevicePortOverrideArgs
                {
                    Number = 3,
                    Name = "access vlan",
                    Forward = "customize",
                    NativeNetworkconfId = nativeNetworkId,
                    SettingPreference = "manual",
                },
                new Unifi.Inputs.DevicePortOverrideArgs
                {
                    Number = 4,
                    Name = "trunk except guest",
                    Forward = "customize",
                    TaggedVlanMgmt = "custom",
                    ExcludedNetworkIds = new[]
                    {
                        someVlanNetworkId,
                    },
                    SettingPreference = "manual",
                },
                new Unifi.Inputs.DevicePortOverrideArgs
                {
                    Number = 11,
                    OpMode = "aggregate",
                    AggregateNumPorts = 2,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.port.PortFunctions;
    import com.pulumi.unifi.port.inputs.GetProfileArgs;
    import com.pulumiverse.unifi.port.Profile;
    import com.pulumiverse.unifi.port.ProfileArgs;
    import com.pulumiverse.unifi.Device;
    import com.pulumiverse.unifi.DeviceArgs;
    import com.pulumi.unifi.inputs.DevicePortOverrideArgs;
    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) {
            final var disabled = PortFunctions.getProfile(GetProfileArgs.builder()
                .name("Disabled")
                .build());
    
            var poe = new Profile("poe", ProfileArgs.builder()
                .name("poe")
                .forward("customize")
                .nativeNetworkconfId(nativeNetworkId)
                .excludedNetworkIds(someVlanNetworkId)
                .poeMode("auto")
                .build());
    
            var us24Poe = new Device("us24Poe", DeviceArgs.builder()
                .mac("01:23:45:67:89:AB")
                .name("Switch with POE")
                .portOverrides(            
                    DevicePortOverrideArgs.builder()
                        .number(1)
                        .name("port w/ poe")
                        .portProfileId(poe.id())
                        .build(),
                    DevicePortOverrideArgs.builder()
                        .number(2)
                        .name("disabled")
                        .portProfileId(disabled.id())
                        .build(),
                    DevicePortOverrideArgs.builder()
                        .number(3)
                        .name("access vlan")
                        .forward("customize")
                        .nativeNetworkconfId(nativeNetworkId)
                        .settingPreference("manual")
                        .build(),
                    DevicePortOverrideArgs.builder()
                        .number(4)
                        .name("trunk except guest")
                        .forward("customize")
                        .taggedVlanMgmt("custom")
                        .excludedNetworkIds(someVlanNetworkId)
                        .settingPreference("manual")
                        .build(),
                    DevicePortOverrideArgs.builder()
                        .number(11)
                        .opMode("aggregate")
                        .aggregateNumPorts(2)
                        .build())
                .build());
    
        }
    }
    
    resources:
      poe:
        type: unifi:port:Profile
        properties:
          name: poe
          forward: customize
          nativeNetworkconfId: ${nativeNetworkId}
          excludedNetworkIds:
            - ${someVlanNetworkId}
          poeMode: auto
      us24Poe:
        type: unifi:Device
        name: us_24_poe
        properties:
          mac: 01:23:45:67:89:AB
          name: Switch with POE
          portOverrides:
            - number: 1
              name: port w/ poe
              portProfileId: ${poe.id}
            - number: 2
              name: disabled
              portProfileId: ${disabled.id}
            - number: 3
              name: access vlan
              forward: customize
              nativeNetworkconfId: ${nativeNetworkId}
              settingPreference: manual
            - number: 4
              name: trunk except guest
              forward: customize
              taggedVlanMgmt: custom
              excludedNetworkIds:
                - ${someVlanNetworkId}
              settingPreference: manual
            - number: 11
              opMode: aggregate
              aggregateNumPorts: 2
    variables:
      disabled:
        fn::invoke:
          function: unifi:port:getProfile
          arguments:
            name: Disabled
    
    pulumi {
      required_providers {
        unifi = {
          source = "pulumi/unifi"
        }
      }
    }
    
    data "unifi_port_getprofile" "disabled" {
      name = "Disabled"
    }
    
    # look up the built-in disabled port profile
    resource "unifi_port_profile" "poe" {
      name                  = "poe"
      forward               = "customize"
      native_networkconf_id = nativeNetworkId
      excluded_network_ids  = [someVlanNetworkId]
      poe_mode              = "auto"
    }
    resource "unifi_device" "us_24_poe" {
      mac  = "01:23:45:67:89:AB"
      name = "Switch with POE"
      port_overrides {
        number          = 1
        name            = "port w/ poe"
        port_profile_id = unifi_port_profile.poe.id
      }
      port_overrides {
        number          = 2
        name            = "disabled"
        port_profile_id = data.unifi_port_getprofile.disabled.id
      }
      port_overrides {
        number                = 3
        name                  = "access vlan"
        forward               = "customize"
        native_networkconf_id = nativeNetworkId
        setting_preference    = "manual"
      }
      port_overrides {
        number               = 4
        name                 = "trunk except guest"
        forward              = "customize"
        tagged_vlan_mgmt     = "custom"
        excluded_network_ids = [someVlanNetworkId]
        setting_preference   = "manual"
      }
      port_overrides {
        number              = 11
        op_mode             = "aggregate"
        aggregate_num_ports = 2
      }
    }
    

    Create Device Resource

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

    Constructor syntax

    new Device(name: string, args?: DeviceArgs, opts?: CustomResourceOptions);
    @overload
    def Device(resource_name: str,
               args: Optional[DeviceArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Device(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               allow_adoption: Optional[bool] = None,
               ether_lighting: Optional[DeviceEtherLightingArgs] = None,
               forget_on_destroy: Optional[bool] = None,
               mac: Optional[str] = None,
               name: Optional[str] = None,
               port_overrides: Optional[Sequence[DevicePortOverrideArgs]] = None,
               radios: Optional[Sequence[DeviceRadioArgs]] = None,
               site: Optional[str] = None,
               switch_vlan_enabled: Optional[bool] = None)
    func NewDevice(ctx *Context, name string, args *DeviceArgs, opts ...ResourceOption) (*Device, error)
    public Device(string name, DeviceArgs? args = null, CustomResourceOptions? opts = null)
    public Device(String name, DeviceArgs args)
    public Device(String name, DeviceArgs args, CustomResourceOptions options)
    
    type: unifi:Device
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "unifi_device" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DeviceArgs
    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 DeviceArgs
    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 DeviceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeviceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeviceArgs
    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 deviceResource = new Unifi.Device("deviceResource", new()
    {
        AllowAdoption = false,
        EtherLighting = new Unifi.Inputs.DeviceEtherLightingArgs
        {
            Behavior = "string",
            Brightness = 0,
            LedMode = "string",
            Mode = "string",
        },
        ForgetOnDestroy = false,
        Mac = "string",
        Name = "string",
        PortOverrides = new[]
        {
            new Unifi.Inputs.DevicePortOverrideArgs
            {
                Number = 0,
                AggregateNumPorts = 0,
                ExcludedNetworkIds = new[]
                {
                    "string",
                },
                Forward = "string",
                Name = "string",
                NativeNetworkconfId = "string",
                OpMode = "string",
                PoeMode = "string",
                PortProfileId = "string",
                SettingPreference = "string",
                TaggedVlanMgmt = "string",
                VoiceNetworkconfId = "string",
            },
        },
        Radios = new[]
        {
            new Unifi.Inputs.DeviceRadioArgs
            {
                Name = "string",
                Channel = "string",
                Ht = 0,
                MinRssi = 0,
                MinRssiEnabled = false,
                TxPower = "string",
                TxPowerMode = "string",
            },
        },
        Site = "string",
        SwitchVlanEnabled = false,
    });
    
    example, err := unifi.NewDevice(ctx, "deviceResource", &unifi.DeviceArgs{
    	AllowAdoption: pulumi.Bool(false),
    	EtherLighting: &unifi.DeviceEtherLightingArgs{
    		Behavior:   pulumi.String("string"),
    		Brightness: pulumi.Int(0),
    		LedMode:    pulumi.String("string"),
    		Mode:       pulumi.String("string"),
    	},
    	ForgetOnDestroy: pulumi.Bool(false),
    	Mac:             pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	PortOverrides: unifi.DevicePortOverrideArray{
    		&unifi.DevicePortOverrideArgs{
    			Number:            pulumi.Int(0),
    			AggregateNumPorts: pulumi.Int(0),
    			ExcludedNetworkIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Forward:             pulumi.String("string"),
    			Name:                pulumi.String("string"),
    			NativeNetworkconfId: pulumi.String("string"),
    			OpMode:              pulumi.String("string"),
    			PoeMode:             pulumi.String("string"),
    			PortProfileId:       pulumi.String("string"),
    			SettingPreference:   pulumi.String("string"),
    			TaggedVlanMgmt:      pulumi.String("string"),
    			VoiceNetworkconfId:  pulumi.String("string"),
    		},
    	},
    	Radios: unifi.DeviceRadioArray{
    		&unifi.DeviceRadioArgs{
    			Name:           pulumi.String("string"),
    			Channel:        pulumi.String("string"),
    			Ht:             pulumi.Int(0),
    			MinRssi:        pulumi.Int(0),
    			MinRssiEnabled: pulumi.Bool(false),
    			TxPower:        pulumi.String("string"),
    			TxPowerMode:    pulumi.String("string"),
    		},
    	},
    	Site:              pulumi.String("string"),
    	SwitchVlanEnabled: pulumi.Bool(false),
    })
    
    resource "unifi_device" "deviceResource" {
      lifecycle {
        create_before_destroy = true
      }
      allow_adoption = false
      ether_lighting = {
        behavior   = "string"
        brightness = 0
        led_mode   = "string"
        mode       = "string"
      }
      forget_on_destroy = false
      mac               = "string"
      name              = "string"
      port_overrides {
        number                = 0
        aggregate_num_ports   = 0
        excluded_network_ids  = ["string"]
        forward               = "string"
        name                  = "string"
        native_networkconf_id = "string"
        op_mode               = "string"
        poe_mode              = "string"
        port_profile_id       = "string"
        setting_preference    = "string"
        tagged_vlan_mgmt      = "string"
        voice_networkconf_id  = "string"
      }
      radios {
        name             = "string"
        channel          = "string"
        ht               = 0
        min_rssi         = 0
        min_rssi_enabled = false
        tx_power         = "string"
        tx_power_mode    = "string"
      }
      site                = "string"
      switch_vlan_enabled = false
    }
    
    var deviceResource = new Device("deviceResource", DeviceArgs.builder()
        .allowAdoption(false)
        .etherLighting(DeviceEtherLightingArgs.builder()
            .behavior("string")
            .brightness(0)
            .ledMode("string")
            .mode("string")
            .build())
        .forgetOnDestroy(false)
        .mac("string")
        .name("string")
        .portOverrides(DevicePortOverrideArgs.builder()
            .number(0)
            .aggregateNumPorts(0)
            .excludedNetworkIds("string")
            .forward("string")
            .name("string")
            .nativeNetworkconfId("string")
            .opMode("string")
            .poeMode("string")
            .portProfileId("string")
            .settingPreference("string")
            .taggedVlanMgmt("string")
            .voiceNetworkconfId("string")
            .build())
        .radios(DeviceRadioArgs.builder()
            .name("string")
            .channel("string")
            .ht(0)
            .minRssi(0)
            .minRssiEnabled(false)
            .txPower("string")
            .txPowerMode("string")
            .build())
        .site("string")
        .switchVlanEnabled(false)
        .build());
    
    device_resource = unifi.Device("deviceResource",
        allow_adoption=False,
        ether_lighting={
            "behavior": "string",
            "brightness": 0,
            "led_mode": "string",
            "mode": "string",
        },
        forget_on_destroy=False,
        mac="string",
        name="string",
        port_overrides=[{
            "number": 0,
            "aggregate_num_ports": 0,
            "excluded_network_ids": ["string"],
            "forward": "string",
            "name": "string",
            "native_networkconf_id": "string",
            "op_mode": "string",
            "poe_mode": "string",
            "port_profile_id": "string",
            "setting_preference": "string",
            "tagged_vlan_mgmt": "string",
            "voice_networkconf_id": "string",
        }],
        radios=[{
            "name": "string",
            "channel": "string",
            "ht": 0,
            "min_rssi": 0,
            "min_rssi_enabled": False,
            "tx_power": "string",
            "tx_power_mode": "string",
        }],
        site="string",
        switch_vlan_enabled=False)
    
    const deviceResource = new unifi.Device("deviceResource", {
        allowAdoption: false,
        etherLighting: {
            behavior: "string",
            brightness: 0,
            ledMode: "string",
            mode: "string",
        },
        forgetOnDestroy: false,
        mac: "string",
        name: "string",
        portOverrides: [{
            number: 0,
            aggregateNumPorts: 0,
            excludedNetworkIds: ["string"],
            forward: "string",
            name: "string",
            nativeNetworkconfId: "string",
            opMode: "string",
            poeMode: "string",
            portProfileId: "string",
            settingPreference: "string",
            taggedVlanMgmt: "string",
            voiceNetworkconfId: "string",
        }],
        radios: [{
            name: "string",
            channel: "string",
            ht: 0,
            minRssi: 0,
            minRssiEnabled: false,
            txPower: "string",
            txPowerMode: "string",
        }],
        site: "string",
        switchVlanEnabled: false,
    });
    
    type: unifi:Device
    properties:
        allowAdoption: false
        etherLighting:
            behavior: string
            brightness: 0
            ledMode: string
            mode: string
        forgetOnDestroy: false
        mac: string
        name: string
        portOverrides:
            - aggregateNumPorts: 0
              excludedNetworkIds:
                - string
              forward: string
              name: string
              nativeNetworkconfId: string
              number: 0
              opMode: string
              poeMode: string
              portProfileId: string
              settingPreference: string
              taggedVlanMgmt: string
              voiceNetworkconfId: string
        radios:
            - channel: string
              ht: 0
              minRssi: 0
              minRssiEnabled: false
              name: string
              txPower: string
              txPowerMode: string
        site: string
        switchVlanEnabled: false
    

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

    AllowAdoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    EtherLighting Pulumiverse.Unifi.Inputs.DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    ForgetOnDestroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    Mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    Name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    PortOverrides List<Pulumiverse.Unifi.Inputs.DevicePortOverride>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    Radios List<Pulumiverse.Unifi.Inputs.DeviceRadio>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    Site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    SwitchVlanEnabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    AllowAdoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    EtherLighting DeviceEtherLightingArgs
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    ForgetOnDestroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    Mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    Name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    PortOverrides []DevicePortOverrideArgs

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    Radios []DeviceRadioArgs

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    Site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    SwitchVlanEnabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allow_adoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    ether_lighting object
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forget_on_destroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    port_overrides list(object)

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios list(object)

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switch_vlan_enabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption Boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    etherLighting DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy Boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac String
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name String
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides List<DevicePortOverride>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios List<DeviceRadio>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site String
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled Boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    etherLighting DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides DevicePortOverride[]

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios DeviceRadio[]

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allow_adoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    ether_lighting DeviceEtherLightingArgs
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forget_on_destroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac str
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name str
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    port_overrides Sequence[DevicePortOverrideArgs]

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios Sequence[DeviceRadioArgs]

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site str
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switch_vlan_enabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption Boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    etherLighting Property Map
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy Boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac String
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name String
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides List<Property Map>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios List<Property Map>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site String
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled Boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.

    Outputs

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

    Disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    Id string
    The provider-assigned unique ID for this managed resource.
    Disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    Id string
    The provider-assigned unique ID for this managed resource.
    disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    id string
    The provider-assigned unique ID for this managed resource.
    disabled Boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    id String
    The provider-assigned unique ID for this managed resource.
    disabled boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    id string
    The provider-assigned unique ID for this managed resource.
    disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    id str
    The provider-assigned unique ID for this managed resource.
    disabled Boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Device Resource

    Get an existing Device 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?: DeviceState, opts?: CustomResourceOptions): Device
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_adoption: Optional[bool] = None,
            disabled: Optional[bool] = None,
            ether_lighting: Optional[DeviceEtherLightingArgs] = None,
            forget_on_destroy: Optional[bool] = None,
            mac: Optional[str] = None,
            name: Optional[str] = None,
            port_overrides: Optional[Sequence[DevicePortOverrideArgs]] = None,
            radios: Optional[Sequence[DeviceRadioArgs]] = None,
            site: Optional[str] = None,
            switch_vlan_enabled: Optional[bool] = None) -> Device
    func GetDevice(ctx *Context, name string, id IDInput, state *DeviceState, opts ...ResourceOption) (*Device, error)
    public static Device Get(string name, Input<string> id, DeviceState? state, CustomResourceOptions? opts = null)
    public static Device get(String name, Output<String> id, DeviceState state, CustomResourceOptions options)
    resources:  _:    type: unifi:Device    get:      id: ${id}
    import {
      to = unifi_device.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.
    The following state arguments are supported:
    AllowAdoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    Disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    EtherLighting Pulumiverse.Unifi.Inputs.DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    ForgetOnDestroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    Mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    Name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    PortOverrides List<Pulumiverse.Unifi.Inputs.DevicePortOverride>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    Radios List<Pulumiverse.Unifi.Inputs.DeviceRadio>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    Site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    SwitchVlanEnabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    AllowAdoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    Disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    EtherLighting DeviceEtherLightingArgs
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    ForgetOnDestroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    Mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    Name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    PortOverrides []DevicePortOverrideArgs

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    Radios []DeviceRadioArgs

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    Site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    SwitchVlanEnabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allow_adoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    ether_lighting object
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forget_on_destroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    port_overrides list(object)

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios list(object)

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switch_vlan_enabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption Boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    disabled Boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    etherLighting DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy Boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac String
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name String
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides List<DevicePortOverride>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios List<DeviceRadio>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site String
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled Boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    disabled boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    etherLighting DeviceEtherLighting
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac string
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name string
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides DevicePortOverride[]

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios DeviceRadio[]

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site string
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allow_adoption bool
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    disabled bool
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    ether_lighting DeviceEtherLightingArgs
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forget_on_destroy bool
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac str
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name str
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    port_overrides Sequence[DevicePortOverrideArgs]

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios Sequence[DeviceRadioArgs]

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site str
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switch_vlan_enabled bool
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.
    allowAdoption Boolean
    Whether to automatically adopt the device when creating this resource. When true:

    • The controller will attempt to adopt the device
    • Device must be in a pending adoption state
    • Device must be accessible on the network Set to false if you want to manage adoption manually.
    disabled Boolean
    Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
    etherLighting Property Map
    Etherlighting configuration for switches with per-port LEDs (e.g. USW Pro Max). mode = "network" colors each port's LED by the VLAN/network it serves (per-network colors come from the site-level Etherlighting palette); mode = "speed" colors by link speed. Only the fields you set are written — unset fields keep their controller-side values (read-modify-write overlay). Devices without Etherlighting hardware ignore this object.
    forgetOnDestroy Boolean
    Whether to forget (un-adopt) the device when this resource is destroyed. When true:

    • The device will be removed from the controller
    • The device will need to be readopted to be managed again
    • Device configuration will be reset Set to false to keep the device adopted when removing from Terraform management.
    mac String
    The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
    name String
    A friendly name for the device that will be displayed in the UniFi controller UI. Examples:

    • 'Office-AP-1' for an access point
    • 'Core-Switch-01' for a switch
    • 'Main-Gateway' for a gateway Choose descriptive names that indicate location and purpose.
    portOverrides List<Property Map>

    A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:

    • Port names and labels for easy identification
    • Port profiles for VLAN and security settings
    • Per-port native (untagged) and tagged VLAN behavior, inline, without authoring a unifi.port.Profile
    • Operating modes for special functions

    Common use cases include:

    • Setting up trunk ports for inter-switch connections
    • Configuring PoE settings for powered devices
    • Creating mirrored ports for network monitoring
    • Setting up link aggregation between switches or servers

    Warning: the controller stores port overrides as a single array on the device and the provider replaces the entire array on every apply. Any port whose override is set outside Terraform (e.g. via the UniFi UI or another tool) and is NOT declared here will have its override reset to the controller default on the next apply. Declare every port you want overridden.

    Tagged-VLAN model: there is no positive "allowed VLANs" list. With forward = "customize", tagged traffic is all networks minus the ones listed in excludedNetworkIds, so an empty excludedNetworkIds means "trunk everything", not "trunk nothing".

    radios List<Property Map>

    Per-band radio configuration for access points. Each block configures ONE band (ng = 2.4GHz, na = 5GHz, 6e = 6GHz). Only the bands you declare are managed — undeclared bands are left untouched (the provider read-modify-writes the device's full radio table to preserve them, so declaring just one band will not wipe the others). Common uses: disable a band (txPowerMode = "disabled"), pin a channel/width, or set a minimum-RSSI client kick. Applies to access points; has no effect on switches.

    Note: like other device fields, only non-zero values are written, so a field cannot be set back to its zero value through Terraform — manage by overriding with explicit non-zero values.

    site String
    The name of the UniFi site where the device is located. If not specified, the default site will be used.
    switchVlanEnabled Boolean
    Whether per-port VLAN configuration is enabled on the device. Required for portOverride blocks with VLAN-tagging profiles (e.g. an IoT-VLAN portProfileId) to actually take effect on access points that expose passthrough Ethernet ports (UAP-UHDIW and similar in-wall units). Switches honor port profile VLAN bindings unconditionally; APs ignore them unless this flag is true. Note: the underlying field uses omitempty so setting this to false has no effect — once enabled on a device, it can only be disabled via the UI.

    Supporting Types

    DeviceEtherLighting, DeviceEtherLightingArgs

    Behavior string
    LED animation: steady or breath.
    Brightness int
    LED brightness, 1-100.
    LedMode string
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    Mode string
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    Behavior string
    LED animation: steady or breath.
    Brightness int
    LED brightness, 1-100.
    LedMode string
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    Mode string
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    behavior string
    LED animation: steady or breath.
    brightness number
    LED brightness, 1-100.
    led_mode string
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    mode string
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    behavior String
    LED animation: steady or breath.
    brightness Integer
    LED brightness, 1-100.
    ledMode String
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    mode String
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    behavior string
    LED animation: steady or breath.
    brightness number
    LED brightness, 1-100.
    ledMode string
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    mode string
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    behavior str
    LED animation: steady or breath.
    brightness int
    LED brightness, 1-100.
    led_mode str
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    mode str
    Color scheme: network (color by VLAN/network) or speed (color by link speed).
    behavior String
    LED animation: steady or breath.
    brightness Number
    LED brightness, 1-100.
    ledMode String
    etherlighting (colored per-port LEDs) or standard (plain status LEDs).
    mode String
    Color scheme: network (color by VLAN/network) or speed (color by link speed).

    DevicePortOverride, DevicePortOverrideArgs

    Number int
    The physical port number on the switch to configure.
    AggregateNumPorts int
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    ExcludedNetworkIds List<string>
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    Forward string

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    Name string
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    NativeNetworkconfId string

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    OpMode string
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    PoeMode string
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    PortProfileId string
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    SettingPreference string
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    TaggedVlanMgmt string

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    VoiceNetworkconfId string

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    Number int
    The physical port number on the switch to configure.
    AggregateNumPorts int
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    ExcludedNetworkIds []string
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    Forward string

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    Name string
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    NativeNetworkconfId string

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    OpMode string
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    PoeMode string
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    PortProfileId string
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    SettingPreference string
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    TaggedVlanMgmt string

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    VoiceNetworkconfId string

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    number number
    The physical port number on the switch to configure.
    aggregate_num_ports number
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    excluded_network_ids list(string)
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    forward string

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    name string
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    native_networkconf_id string

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    op_mode string
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    poe_mode string
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    port_profile_id string
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    setting_preference string
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    tagged_vlan_mgmt string

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    voice_networkconf_id string

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    number Integer
    The physical port number on the switch to configure.
    aggregateNumPorts Integer
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    excludedNetworkIds List<String>
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    forward String

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    name String
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    nativeNetworkconfId String

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    opMode String
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    poeMode String
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    portProfileId String
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    settingPreference String
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    taggedVlanMgmt String

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    voiceNetworkconfId String

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    number number
    The physical port number on the switch to configure.
    aggregateNumPorts number
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    excludedNetworkIds string[]
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    forward string

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    name string
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    nativeNetworkconfId string

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    opMode string
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    poeMode string
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    portProfileId string
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    settingPreference string
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    taggedVlanMgmt string

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    voiceNetworkconfId string

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    number int
    The physical port number on the switch to configure.
    aggregate_num_ports int
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    excluded_network_ids Sequence[str]
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    forward str

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    name str
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    native_networkconf_id str

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    op_mode str
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    poe_mode str
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    port_profile_id str
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    setting_preference str
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    tagged_vlan_mgmt str

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    voice_networkconf_id str

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    number Number
    The physical port number on the switch to configure.
    aggregateNumPorts Number
    The number of ports to include in a link aggregation group (LAG). Valid range: 2-8 ports. Used when:

    • Creating switch-to-switch uplinks for increased bandwidth
    • Setting up high-availability connections
    • Connecting to servers requiring more bandwidth Note: All ports in the LAG must be sequential and have matching configurations.
    excludedNetworkIds List<String>
    Set of network IDs to exclude when forward = "customize". Tagged traffic on the port is all networks minus the ones listed here, so an empty set means "trunk everything". Computed when not set, so the controller's current exclusions are preserved without producing a diff.
    forward String

    VLAN forwarding mode for the port. Valid values are:

    • all - Forward all VLANs (trunk port)
    • native - Only forward untagged traffic (access port)
    • customize - Forward selected VLANs (use with excludedNetworkIds)
    • disabled - Disable VLAN forwarding

    This attribute has NO default: leaving it unset keeps the port's existing forwarding behavior (the value is computed from the controller). Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    name String
    A friendly name for the port that will be displayed in the UniFi controller UI. Examples:

    • 'Uplink to Core Switch'
    • 'Conference Room AP'
    • 'Server LACP Group 1'
    • 'VoIP Phone Port'
    nativeNetworkconfId String

    The ID of the network to use as the native (untagged) network on this port. This is typically used for:

    • Access ports where devices need untagged access
    • Trunk ports to specify the native VLAN
    • Management networks for network devices

    Computed when not set, so the controller's current value (which it may auto-populate on a port) is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    opMode String
    The operating mode of the port. Valid values are:

    • switch - Normal switching mode (default)
      • Standard port operation for connecting devices
      • Supports VLANs and all standard switching features
    • mirror - Port mirroring for traffic analysis
      • Copies traffic from other ports for monitoring
      • Useful for network troubleshooting and security
    • aggregate - Link aggregation/bonding mode
      • Combines multiple ports for increased bandwidth
      • Used for switch uplinks or high-bandwidth servers
    poeMode String
    The Power over Ethernet (PoE) mode for the port. Valid values are:

    • auto - Automatically detect and power PoE devices (recommended)
      • Provides power based on device negotiation
      • Safest option for most PoE devices
    • pasv24 - Passive 24V PoE
      • For older UniFi devices requiring passive 24V
      • Use with caution to avoid damage
    • passthrough - PoE passthrough mode
      • For daisy-chaining PoE devices
      • Available on select UniFi switches
    • off - Disable PoE on the port
      • For non-PoE devices
      • To prevent unwanted power delivery
    portProfileId String
    The ID of a pre-configured port profile to apply to this port. Port profiles define settings like VLANs, PoE, and other port-specific configurations.
    settingPreference String
    Whether the port's settings are taken from a profile (auto) or set per-port (manual). Valid values are auto and manual. Per-port VLAN overrides (nativeNetworkconfId, taggedVlanMgmt, forward, excludedNetworkIds) generally require settingPreference = "manual" to persist on the controller; with auto the controller may revert inline overrides to profile/auto behavior. Setting this to manual also overrides any portProfileId on the same port. Computed when not set, so the value the controller attaches to the port is preserved without producing a diff.
    taggedVlanMgmt String

    VLAN tagging behavior for the port. Valid values are:

    • auto - Automatically handle VLAN tags (recommended)
    • blockAll - Block all VLAN tagged traffic
    • custom - Custom VLAN configuration (use with forward = "customize" and excludedNetworkIds)

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another value instead.

    voiceNetworkconfId String

    The ID of the network to use for Voice over IP (VoIP) traffic on this port, for automatic voice-VLAN assignment in conjunction with LLDP-MED.

    Computed when not set, so the controller's current value is preserved without producing a diff. Note: the underlying field uses omitempty, so once set it cannot be cleared back to empty through Terraform — change it to another network ID instead.

    DeviceRadio, DeviceRadioArgs

    Name string
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    Channel string
    The channel for this radio (band-specific), or auto to let the controller choose.
    Ht int
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    MinRssi int
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    MinRssiEnabled bool
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    TxPower string
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    TxPowerMode string
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    Name string
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    Channel string
    The channel for this radio (band-specific), or auto to let the controller choose.
    Ht int
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    MinRssi int
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    MinRssiEnabled bool
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    TxPower string
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    TxPowerMode string
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    name string
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    channel string
    The channel for this radio (band-specific), or auto to let the controller choose.
    ht number
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    min_rssi number
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    min_rssi_enabled bool
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    tx_power string
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    tx_power_mode string
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    name String
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    channel String
    The channel for this radio (band-specific), or auto to let the controller choose.
    ht Integer
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    minRssi Integer
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    minRssiEnabled Boolean
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    txPower String
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    txPowerMode String
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    name string
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    channel string
    The channel for this radio (band-specific), or auto to let the controller choose.
    ht number
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    minRssi number
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    minRssiEnabled boolean
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    txPower string
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    txPowerMode string
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    name str
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    channel str
    The channel for this radio (band-specific), or auto to let the controller choose.
    ht int
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    min_rssi int
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    min_rssi_enabled bool
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    tx_power str
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    tx_power_mode str
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).
    name String
    The radio band this block configures: ng (2.4GHz), na (5GHz), or 6e (6GHz).
    channel String
    The channel for this radio (band-specific), or auto to let the controller choose.
    ht Number
    Channel width in MHz for this radio (e.g. 20, 40, 80, 160, 320).
    minRssi Number
    Minimum RSSI in dBm (negative) below which clients are disconnected, when minRssiEnabled is true.
    minRssiEnabled Boolean
    Whether the minimum-RSSI client-disconnect threshold is enabled on this radio. Applied together with minRssi.
    txPower String
    Custom transmit power in dBm, used when txPowerMode = "custom"; otherwise leave unset.
    txPowerMode String
    Transmit-power mode: auto, low, medium, high, custom, or disabled. disabled turns the radio off (e.g. to suppress an unused 2.4GHz band on an in-wall AP).

    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.3.0
    published on Wednesday, Jul 8, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial