feat: support API Key authentication to UniFi controller (#22)

This commit is contained in:
Mateusz Filipowicz
2025-02-23 19:51:18 +01:00
committed by GitHub
parent f5bd8ebb15
commit b7fe359f6c
11 changed files with 149 additions and 19 deletions

View File

@@ -1,7 +1,8 @@
provider "unifi" {
username = var.username # optionally use UNIFI_USERNAME env var
password = var.password # optionally use UNIFI_PASSWORD env var
api_url = var.api_url # optionally use UNIFI_API 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

View File

@@ -1,5 +1,6 @@
username = "tfacctest"
password = "tfacctest1234"
# api_key = "tfacctest1234"
# this assumes the default port for acc testing
api_url = "https://localhost:8443/api/"

View File

@@ -4,6 +4,9 @@ variable "username" {
variable "password" {
}
variable "api_key" {
}
variable "api_url" {
}