add data source unifi_user

implements #174
This commit is contained in:
Tommi2Day
2021-09-05 21:33:01 +02:00
committed by Paul Tyng
parent f5680fdd94
commit 0c3a36b215
6 changed files with 221 additions and 1 deletions

45
docs/data-sources/user.md Normal file
View File

@@ -0,0 +1,45 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "unifi_user Data Source - terraform-provider-unifi"
subcategory: ""
description: |-
unifi_user retrieves properties of a user (or "client" in the UI) of the network by MAC address.
---
# unifi_user (Data Source)
`unifi_user` retrieves properties of a user (or "client" in the UI) of the network by MAC address.
## Example Usage
```terraform
data "unifi_user" "client" {
mac = "01:23:45:67:89:ab"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- **mac** (String) The MAC address of the user.
### Optional
- **site** (String) The name of the site the user is associated with.
### Read-Only
- **blocked** (Boolean) Specifies whether this user should be blocked from the network.
- **dev_id_override** (Number) Override the device fingerprint.
- **fixed_ip** (String) fixed IPv4 address set for this user.
- **hostname** (String) The hostname of the user.
- **id** (String) The ID of the user.
- **ip** (String) The IP address of the user.
- **name** (String) The name of the user.
- **network_id** (String) The network ID for this user.
- **note** (String) A note with additional information for the user.
- **user_group_id** (String) The user group ID for the user.