published on Tuesday, Feb 17, 2026 by Pulumiverse
published on Tuesday, Feb 17, 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,
taggedNetworkconfIds: [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: 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,
tagged_networkconf_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": 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),
TaggedNetworkconfIds: []interface{}{
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(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,
TaggedNetworkconfIds = 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 = 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.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var disabled = PortFunctions.getProfile(GetProfileArgs.builder()
.name("Disabled")
.build());
var poe = new Profile("poe", ProfileArgs.builder()
.name("poe")
.forward("customize")
.nativeNetworkconfId(nativeNetworkId)
.taggedNetworkconfIds(List.of(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(11)
.opMode("aggregate")
.aggregateNumPorts(2)
.build())
.build());
}
}
resources:
poe:
type: unifi:port:Profile
properties:
name: poe
forward: customize
nativeNetworkconfId: ${nativeNetworkId}
taggedNetworkconfIds:
- ${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: 11
opMode: aggregate
aggregateNumPorts: 2
variables:
disabled:
fn::invoke:
function: unifi:port:getProfile
arguments:
name: Disabled
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,
forget_on_destroy: Optional[bool] = None,
mac: Optional[str] = None,
name: Optional[str] = None,
port_overrides: Optional[Sequence[DevicePortOverrideArgs]] = None,
site: Optional[str] = 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.
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.Index.Device("deviceResource", new()
{
AllowAdoption = false,
ForgetOnDestroy = false,
Mac = "string",
Name = "string",
PortOverrides = new[]
{
new Unifi.Inputs.DevicePortOverrideArgs
{
Number = 0,
AggregateNumPorts = 0,
Name = "string",
OpMode = "string",
PoeMode = "string",
PortProfileId = "string",
},
},
Site = "string",
});
example, err := unifi.NewDevice(ctx, "deviceResource", &unifi.DeviceArgs{
AllowAdoption: pulumi.Bool(false),
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),
Name: pulumi.String("string"),
OpMode: pulumi.String("string"),
PoeMode: pulumi.String("string"),
PortProfileId: pulumi.String("string"),
},
},
Site: pulumi.String("string"),
})
var deviceResource = new Device("deviceResource", DeviceArgs.builder()
.allowAdoption(false)
.forgetOnDestroy(false)
.mac("string")
.name("string")
.portOverrides(DevicePortOverrideArgs.builder()
.number(0)
.aggregateNumPorts(0)
.name("string")
.opMode("string")
.poeMode("string")
.portProfileId("string")
.build())
.site("string")
.build());
device_resource = unifi.Device("deviceResource",
allow_adoption=False,
forget_on_destroy=False,
mac="string",
name="string",
port_overrides=[{
"number": 0,
"aggregate_num_ports": 0,
"name": "string",
"op_mode": "string",
"poe_mode": "string",
"port_profile_id": "string",
}],
site="string")
const deviceResource = new unifi.Device("deviceResource", {
allowAdoption: false,
forgetOnDestroy: false,
mac: "string",
name: "string",
portOverrides: [{
number: 0,
aggregateNumPorts: 0,
name: "string",
opMode: "string",
poeMode: "string",
portProfileId: "string",
}],
site: "string",
});
type: unifi:Device
properties:
allowAdoption: false
forgetOnDestroy: false
mac: string
name: string
portOverrides:
- aggregateNumPorts: 0
name: string
number: 0
opMode: string
poeMode: string
portProfileId: string
site: string
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:
- 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.
- Forget
On boolDestroy - 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<Pulumiverse.Unifi. Inputs. Device Port Override> 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
- 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
- Site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- 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.
- Forget
On boolDestroy - 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 []DevicePort Override Args 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
- 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
- Site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On BooleanDestroy - 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<DevicePort Override> 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
- 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
- site String
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On booleanDestroy - 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 DevicePort Override[] 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
- 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
- site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- 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.
- forget_
on_ booldestroy - 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[DevicePort Override Args] 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
- 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
- site str
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On BooleanDestroy - 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<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
- 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
- site String
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Device resource produces the following output properties:
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,
forget_on_destroy: Optional[bool] = None,
mac: Optional[str] = None,
name: Optional[str] = None,
port_overrides: Optional[Sequence[DevicePortOverrideArgs]] = None,
site: Optional[str] = None) -> Devicefunc 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}- 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.
- 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.
- Forget
On boolDestroy - 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<Pulumiverse.Unifi. Inputs. Device Port Override> 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
- 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
- Site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- 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.
- Forget
On boolDestroy - 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 []DevicePort Override Args 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
- 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
- Site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On BooleanDestroy - 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<DevicePort Override> 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
- 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
- site String
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On booleanDestroy - 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 DevicePort Override[] 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
- 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
- site string
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- 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.
- forget_
on_ booldestroy - 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[DevicePort Override Args] 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
- 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
- site str
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
- allow
Adoption 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.
- forget
On BooleanDestroy - 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<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
- 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
- site String
- The name of the UniFi site where the device is located. If not specified, the default site will be used.
Supporting Types
DevicePortOverride, DevicePortOverrideArgs
- Number int
- The physical port number on the switch to configure.
- Aggregate
Num intPorts - 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.
- 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'
- 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 stringId - 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.
- Number int
- The physical port number on the switch to configure.
- Aggregate
Num intPorts - 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.
- 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'
- 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 stringId - 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.
- number Integer
- The physical port number on the switch to configure.
- aggregate
Num IntegerPorts - 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.
- 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'
- 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 StringId - 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.
- number number
- The physical port number on the switch to configure.
- aggregate
Num numberPorts - 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.
- 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'
- 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 stringId - 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.
- number int
- The physical port number on the switch to configure.
- aggregate_
num_ intports - 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.
- 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'
- 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_ strid - 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.
- number Number
- The physical port number on the switch to configure.
- aggregate
Num NumberPorts - 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.
- 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'
- 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 StringId - 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.
Package Details
- Repository
- unifi pulumiverse/pulumi-unifi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
unifiTerraform Provider.
published on Tuesday, Feb 17, 2026 by Pulumiverse
