Files
terraform-provider-kea/examples/resources/kea_clientclass/main.tf
T
unkinben 7c851b8df5
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Add terraform-provider-kea
Terraform/OpenTofu provider wrapping the kea-operator KeaAPI, modelled on
terraform-provider-encapi.

- add kea_subnet and kea_clientclass resources with full CRUD over the
  PUT/GET/DELETE /api/v1/{subnets,clientclasses}/{name} contract
- add provider config (endpoint + bearer token, KEA_API_TOKEN fallback);
  404 on read removes the resource from state
- add unit tests against httptest mock servers (client, wire round-trip,
  type conversions, schemas)
- add Makefile (patch|minor|major + package) and .woodpecker CI mirroring
  terraform-provider-encapi; tag release PUTs the zip to the artifactapi
  terraform-unkin registry under unkin/kea

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-02 19:40:49 +10:00

18 lines
442 B
Terraform

resource "kea_clientclass" "pxeclients" {
name = "pxeclients"
# Match legacy BIOS PXE clients by vendor-class-identifier.
test = "substring(option[60].hex,0,9) == 'PXEClient'"
next_server = "10.0.0.1"
boot_file_name = "ipxe.efi"
}
resource "kea_clientclass" "efi_x64" {
name = "efi-x64"
# Match by client architecture type instead of a test expression.
arch_hex = ["0007", "0009"]
boot_file_name = "ipxe.efi"
}