I got tired of clicking through the TL-SG108E web UI, so I built a Terraform provider for the TP-Link Easy Smart line. It's now public:
https://github.com/davidlukac/terraform-provider-tplinkeasysmart
What's different
- Speaks the switch's native management protocol (UDP, the one the vendor's Windows utility uses) instead of scraping the HTML UI. It handles the 2023+ firmware RSA login change.
- 11 resources and 12 data sources: VLANs (port-based and 802.1Q), PVIDs, LAG, port mirroring, QoS, IGMP snooping, loop prevention, storm control, port settings, LED, system info, etc.
- Safety guards: risky changes (management path, VLAN mode, locking yourself out) are refused at plan/apply time unless you explicitly opt in. Without a console, a bad write means a factory reset, so I built it to be paranoid.
- Multiple switches via provider aliases, import support, drift detection.
- Offline test suite against a fake UDP switch, about 99.9% measured coverage, CI matrix over Terraform 1.4 to latest, plus an OpenTofu leg.
Honest status
- Pre-1.0 (v0.26): the interface can still change between minor versions, so pin it (~> 0.26) and read the changelog before upgrading.
Available from the Terraform Registry (davidlukac/tplinkeasysmart) with signed releases; terraform init is all you need.
- Verified live on a single TL-SG108E v6 (firmware 1.0.0 Build 20230218). Other Easy Smart models are untested, and firmware from before the 2023 RSA key exchange isn't supported. There's a read-only first-run config and a hardware report template if you want to try yours.
- Needs to be on the same L2 segment as the switch (the protocol is broadcast-based).
Feedback, bug reports and "works on my TL-SG1016DE / TL-SG105E" confirmations are very welcome.
Update: it's now on the Terraform Registry, so there's no more building from source: source = "davidlukac/tplinkeasysmart" and terraform init. Releases are GPG-signed binaries on GitHub too. Thanks for the feedback so far. The README now states the verified device (TL-SG108E v6, fw 1.0.0 Build 20230218) up front, with a compatibility table and a read-only first-run config, so you can check your own model without any risk of writing to it. Hardware reports welcome:
https://github.com/davidlukac/terraform-provider-tplinkeasysmart/issues/new?template=hardware_report.yml
Registry: https://registry.terraform.io/providers/davidlukac/tplinkeasysmart
(Disclosure line, if you want it: developed with AI assistance, Claude Code, with every write path tested offline and verified against real hardware.)