* feat: initialize Terraform Plugin Framework * fix docker-compose path for tests * fix: ensure documentation can be generated with old provider SDK and new plugin framework * lint
45 lines
2.3 KiB
Markdown
45 lines
2.3 KiB
Markdown
---
|
|
layout: ""
|
|
page_title: "Provider: Unifi"
|
|
description: |-
|
|
The Unifi provider provides resources to interact with a Unifi controller API.
|
|
---
|
|
|
|
# Unifi Provider
|
|
|
|
The Unifi provider provides resources to interact with a Unifi controller API.
|
|
|
|
It is not recommended to use your own account for management of your controller. A user specific to
|
|
Terraform is recommended. You can create a **Limited Admin** with **Local Access Only** and
|
|
provide that information for authentication. Two-factor authentication is not supported in the provider.
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
provider "unifi" {
|
|
username = var.username # optionally use UNIFI_USERNAME env var
|
|
password = var.password # optionally use UNIFI_PASSWORD env var
|
|
api_key = var.api_key # optionally use UNIFI_API_KEY env var
|
|
api_url = var.api_url # optionally use UNIFI_API env var
|
|
|
|
# you may need to allow insecure TLS communications unless you have configured
|
|
# certificates for your controller
|
|
allow_insecure = var.insecure # optionally use UNIFI_INSECURE env var
|
|
|
|
# if you are not configuring the default site, you can change the site
|
|
# site = "foo" or optionally use UNIFI_SITE env var
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Optional
|
|
|
|
- `allow_insecure` (Boolean) Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
|
|
- `api_key` (String, Sensitive) API Key for the user accessing the API. Can be specified with the `UNIFI_API_KEY` environment variable. Controller version 9.0.108 or later is required.
|
|
- `api_url` (String) URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more standard controller paths.
|
|
- `password` (String, Sensitive) Password for the user accessing the API. Can be specified with the `UNIFI_PASSWORD` environment variable.
|
|
- `site` (String) The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable. Default: `default`
|
|
- `username` (String) Local user name for the Unifi controller API. Can be specified with the `UNIFI_USERNAME` environment variable.
|