The unifi.Account resource manages RADIUS user accounts in the UniFi controller’s built-in RADIUS server.
This resource is used for:
- WPA2/WPA3-Enterprise wireless authentication
- 802.1X wired authentication
- MAC-based device authentication
- VLAN assignment through RADIUS attributes
Important Notes:
- For MAC-based authentication:
- Use the device’s MAC address as both username and password
- Convert MAC address to uppercase with no separators (e.g., ‘00:11:22:33:44:55’ becomes ‘001122334455’)
- VLAN Assignment:
- If no VLAN is specified in the profile, clients will use the network’s untagged VLAN
- VLAN assignment uses standard RADIUS tunnel attributes
Limitations:
- MAC-based authentication works only for wireless and wired clients
- L2TP remote access VPN is not supported with MAC authentication
- Accounts must be unique within a site
Create Account Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);@overload
def Account(resource_name: str,
args: AccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Account(resource_name: str,
opts: Optional[ResourceOptions] = None,
password: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
site: Optional[str] = None,
tunnel_medium_type: Optional[int] = None,
tunnel_type: Optional[int] = None)func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: unifi:Account
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 AccountArgs
- 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 AccountArgs
- 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 AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- 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 accountResource = new Unifi.Account("accountResource", new()
{
Password = "string",
Name = "string",
NetworkId = "string",
Site = "string",
TunnelMediumType = 0,
TunnelType = 0,
});
example, err := unifi.NewAccount(ctx, "accountResource", &unifi.AccountArgs{
Password: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkId: pulumi.String("string"),
Site: pulumi.String("string"),
TunnelMediumType: pulumi.Int(0),
TunnelType: pulumi.Int(0),
})
var accountResource = new Account("accountResource", AccountArgs.builder()
.password("string")
.name("string")
.networkId("string")
.site("string")
.tunnelMediumType(0)
.tunnelType(0)
.build());
account_resource = unifi.Account("accountResource",
password="string",
name="string",
network_id="string",
site="string",
tunnel_medium_type=0,
tunnel_type=0)
const accountResource = new unifi.Account("accountResource", {
password: "string",
name: "string",
networkId: "string",
site: "string",
tunnelMediumType: 0,
tunnelType: 0,
});
type: unifi:Account
properties:
name: string
networkId: string
password: string
site: string
tunnelMediumType: 0
tunnelType: 0
Account 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 Account resource accepts the following input properties:
- Password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- Name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- Network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- Site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- Tunnel
Medium intType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- Tunnel
Type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- Password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- Name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- Network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- Site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- Tunnel
Medium intType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- Tunnel
Type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- password String
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- name String
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id String - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- site String
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium IntegerType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type Integer The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium numberType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type number The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- password str
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- name str
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network_
id str - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- site str
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel_
medium_ inttype The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel_
type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- password String
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- name String
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id String - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- site String
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium NumberType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type Number The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Account Resource
Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
password: Optional[str] = None,
site: Optional[str] = None,
tunnel_medium_type: Optional[int] = None,
tunnel_type: Optional[int] = None) -> Accountfunc GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)resources: _: type: unifi:Account 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.
- Name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- Network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- Password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- Site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- Tunnel
Medium intType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- Tunnel
Type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- Name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- Network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- Password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- Site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- Tunnel
Medium intType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- Tunnel
Type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- name String
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id String - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- password String
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- site String
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium IntegerType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type Integer The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- name string
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id string - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- password string
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- site string
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium numberType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type number The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- name str
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network_
id str - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- password str
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- site str
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel_
medium_ inttype The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel_
type int The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
- name String
- The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
- network
Id String - The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
- password String
- The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
- site String
- The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
- tunnel
Medium NumberType The RADIUS tunnel medium type attribute (RFC 2868, section 3.2). Common values:
6- 802 (includes Ethernet, Token Ring, FDDI) (default)1- IPv42- IPv6
Only change this if you need specific tunneling behavior.
- tunnel
Type Number The RADIUS tunnel type attribute (RFC 2868, section 3.1). Common values:
13- VLAN (default)1- Point-to-Point Protocol (PPTP)9- Point-to-Point Protocol (L2TP)
Only change this if you need specific tunneling behavior.
Package Details
- Repository
- unifi pulumiverse/pulumi-unifi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
unifiTerraform Provider.
