diff --git a/CHANGELOG.md b/CHANGELOG.md index c4f8118a..65b1c245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.15.0](https://github.com/terraform-routeros/terraform-provider-routeros/compare/v1.14.0...v1.15.0) (2023-09-20) + + +### Features + +* Add routeros_ip_dhcp_server_option and routeros_ip_dhcp_server_option_set ([#259](https://github.com/terraform-routeros/terraform-provider-routeros/issues/259)) ([3722afb](https://github.com/terraform-routeros/terraform-provider-routeros/commit/3722afb8574250a7a7e3211f2e40f3b4acfdc56f)) + ## [1.14.0](https://github.com/terraform-routeros/terraform-provider-routeros/compare/v1.13.3...v1.14.0) (2023-09-19) diff --git a/docs/resources/ip_dhcp_server_option.md b/docs/resources/ip_dhcp_server_option.md new file mode 100644 index 00000000..06af7c8f --- /dev/null +++ b/docs/resources/ip_dhcp_server_option.md @@ -0,0 +1,42 @@ +# routeros_ip_dhcp_server_option (Resource) +Creates a DHCP lease on the mikrotik device. + +## Example Usage +```terraform +resource "routeros_ip_dhcp_server_option" "jumbo_frame_opt" { + code = 77 + name = "jumbo-mtu-opt" + value = "0x2336" +} + +resource "routeros_ip_dhcp_server_option" "tftp_option" { + code = 66 + name = "tftpserver-66" + value = "s'10.10.10.22'" +} +``` + + +## Schema + +### Required + +- `code` (Number) The number of the DHCP option +- `name` (String) The name of the DHCP option +- `value` (String) The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server#DHCP_Options + +### Optional + + +### Read-Only + +- `id` (String) The ID of this resource. +- `raw_value` (String) The computed value of the option as an hex value + +## Import +Import is supported using the following syntax: +```shell +#The ID can be found via API or the terminal +#The command for the terminal is -> :put [/ip/dhcp-server/option/get [print show-ids]] +terraform import routeros_ip_dhcp_server_option.tftp_option "*1" +``` diff --git a/docs/resources/ip_dhcp_server_option_set.md b/docs/resources/ip_dhcp_server_option_set.md new file mode 100644 index 00000000..f6f481b0 --- /dev/null +++ b/docs/resources/ip_dhcp_server_option_set.md @@ -0,0 +1,45 @@ +# routeros_ip_dhcp_server_option_set (Resource) +Creates a DHCP lease on the mikrotik device. + +## Example Usage +```terraform +resource "routeros_ip_dhcp_server_option" "jumbo_frame_opt" { + code = 77 + name = "jumbo-mtu-opt" + value = "0x2336" +} + +resource "routeros_ip_dhcp_server_option" "tftp_option" { + code = 66 + name = "tftpserver-66" + value = "s'10.10.10.22'" +} + +resource "routeros_ip_dhcp_server_option_set" "lan_option_set" { + name = "lan-option-set" + options = join(",", [routeros_ip_dhcp_server_option.jumbo_frame_opt.name, routeros_ip_dhcp_server_option.tftp_option.name]) +} +``` + + +## Schema + +### Required + +- `name` (String) The name of the DHCP option +- `options` (String) The comma sepparated list of options + +### Optional + + +### Read-Only + +- `id` (String) The ID of this resource. + +## Import +Import is supported using the following syntax: +```shell +#The ID can be found via API or the terminal +#The command for the terminal is -> :put [/ip/dhcp-server/option/sets/get [print show-ids]] +terraform import routeros_ip_dhcp_server_option_set.lan_option_set "*1" +``` diff --git a/package.json b/package.json index 75d43efd..961985a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "terraform-provider-routeros", - "version": "1.14.0", + "version": "1.15.0", "repository": { "type": "git", "url": "https://github.com/terraform-routeros/terraform-provider-routeros"