opnsense_kea_reservation (Resource)

Configure DHCP reservations for Kea.

Example Usage

// Small example
resource "opnsense_kea_reservation" "test" {
  subnet_id = resource.opnsense_kea_subnet.lan.id

  ip_address = "10.8.2.102"
  mac_address = "00:25:96:12:34:55"

  description = "example host"
}

// LAN subnet example
resource "opnsense_kea_subnet" "lan" {
  subnet = "10.8.0.0/16"
  description = "LAN"
}

Schema

Required

  • ip_address (String) IP address to offer to the client.
  • mac_address (String) MAC/Ether address of the client in question.
  • subnet_id (String) Subnet ID the reservation belongs to.

Optional

  • description (String) Optional description here for your reference (not parsed).
  • hostname (String) Hostname to offer to the client. Defaults to ""..

Read-Only

  • id (String) UUID of the reservation.

Import

In Terraform v1.5.0 and later, use an import block to import opnsense_kea_reservation using the id. For example:

import {
  to = opnsense_kea_reservation.example
  id = "<opnsense-resource-id>"
}

Using terraform import, import opnsense_kea_reservation using the id. For example:

% terraform import opnsense_kea_reservation.example <opnsense-resource-id>