deevnet_iot_device (Resource) #
A device in the tenant’s registry.
The entry is the device’s identity: an application-owned device takes no substrate host record and is named in its owner’s own zone. It leases from its trust class’s pool unless a deevnet_iot_address reserves it a fixed address.
Registering a device grants it nothing. It is identity, not authorization. Flash devices with a deevnet_iot_wifi_key to put them on the air; that key is per tenant, and does not reference this resource.
Example Usage #
# Registering a device grants it nothing. It is identity, not authorization.
resource "deevnet_iot_device" "stand" {
tenant = deevnet_tenant.this.name
name = "stand-1"
trust_class = "iot"
# Needed only when the device asks for a fixed address. Never authorization:
# a MAC is trivially spoofed on a shared segment.
mac = "aa:bb:cc:dd:ee:ff"
}
Schema #
Required #
name(String) A label for the device, unique within the tenant.tenant(String) The tenant this device belongs to: thenameof adeevnet_tenant.trust_class(String)iotfor devices whose firmware the tenant controls,iot_vendorfor devices whose vendor does. Changing it replaces the device, because its SSID, its VLAN and any later service grants would otherwise all move under an unchanged name.
Optional #
mac(String) The device’s hardware address. It is never an authorization input — a MAC is trivially spoofed on a shared segment. It is needed only by a device that is to hold a fixed address (deevnet_iot_address), which is reserved for it. It is mutable: swapping the hardware behind a name is an inventory change, not a new device, and a device that holds an address keeps it. Accepted in any usual spelling and stored lowercase, colon-separated.
Read-Only #
present(Boolean) Whether the API still holds this device.status(String)readyonce the entry exists. Registering calls no backend, so it is ready at once.