7c851b8df5
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
18 lines
442 B
Terraform
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"
|
|
}
|