deevnet_iot_wifi_key

deevnet_iot_wifi_key (Resource) #

A Wi-Fi key for the tenant’s IoT devices, bound to its trust class’s VLAN.

Flash devices with ssid and psk. One key serves every device the tenant flashes with it.

Replacing this resource issues a new key, and every device already flashed with the old one stops associating until it is reflashed. A rebuilt API does not do that: it restores the key from this state. Use -replace only when you mean to revoke.

Example Usage #

# One key per tenant per trust class: every device the tenant flashes with it
# shares it, so revoking it stops all of them.
resource "deevnet_iot_wifi_key" "devices" {
  tenant      = deevnet_tenant.this.name
  name        = "devices"
  trust_class = "iot"
}

# Flash devices with these two. Never hardcode the SSID: the same trust class
# is a different SSID at another site.
output "device_wifi" {
  value = {
    ssid = deevnet_iot_wifi_key.devices.ssid
    psk  = deevnet_iot_wifi_key.devices.psk
  }
  sensitive = true
}

Schema #

Required #

  • name (String) A label for the key, unique within the tenant.
  • tenant (String) The tenant this Wi-Fi key belongs to: the name of a deevnet_tenant.
  • trust_class (String) iot for devices whose firmware the tenant controls, iot_vendor for devices whose vendor does, tenant_dev for a developer’s laptop on the tenant developer network. The VLAN follows from this and cannot be chosen. Changing it replaces the key, because every device holding the old one would otherwise move VLAN silently.

Optional #

  • mac (String) Binds the key to one client: the wireless controller then admits it from this MAC only. Suits a tenant_dev key, one per laptop; turn off the laptop’s private/random Wi-Fi address for this network first. Changing it rebinds the key without reissuing it; removing it unbinds.

Read-Only #

  • present (Boolean) Whether the API still holds this key.
  • psk (String, Sensitive) The password to flash devices with. Generated by the API; this state holds the authoritative copy.
  • secrets_stored (Boolean) False when the API can no longer read its copy of the key. The next apply resupplies it.
  • ssid (String) The SSID to flash devices with. Do not hardcode it: the same trust class is a different SSID at another site.
  • status (String) ready once the key is on the wireless controller.
  • vlan (Number) The VLAN this key puts a device on. Chosen by the API from the trust class.
Page last modified: October 8, 2026