terraform-provider-hue: manage your Hue bridge with Terraform
I made an open-source (MIT) Terraform provider for the Hue API v2, with a companion CLI, hue-tf. It manages rooms, zones, scenes, smart scenes, switch and dial assignments, and device names and icons. hue-tf also generates import blocks for what you have already set up in the Hue app.
resource "hue_scene" "evening" {
name = "Evening"
group = hue_room.living.id
actions = {
(data.hue_light.sofa.id) = { on = true, brightness = 40, kelvin = 2700 }
(data.hue_light.shelf.id) = { on = true, brightness = 60, color_xy = { x = 0.56, y = 0.38 } }
(data.hue_light.tv.id) = { on = true, brightness = 35, color_xy = { x = 0.3, y = 0.13 } }
}
}
GitHub: https://github.com/akr4/terraform-provider-hue
Terraform Registry: https://registry.terraform.io/providers/akr4/hue/latest
