-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23ec941
commit ef7c585
Showing
7 changed files
with
230 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# routeros_ipv6_dhcp_server (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_ipv6_pool" "pool-0" { | ||
name = "test-pool-0" | ||
prefix = "2001:db8:40::/48" | ||
prefix_length = 64 | ||
} | ||
resource "routeros_ipv6_dhcp_server" "test" { | ||
address_pool = routeros_ipv6_pool.pool-0.name | ||
interface = "bridge" | ||
lease_time = "1m" | ||
name = "test-dhcpv6" | ||
preference = 128 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `address_pool` (String) IPv6 pool, from which to take IPv6 prefix for the clients. | ||
- `interface` (String) The interface on which server will be running. | ||
- `name` (String) Reference name. | ||
|
||
### Optional | ||
|
||
- `allow_dual_stack_queue` (Boolean) Creates a single simple queue entry for both IPv4 and IPv6 addresses, and uses the MAC address and DUID for identification. Requires IPv6 DHCP Server to have this option enabled as well to work properly. | ||
- `binding_script` (String) A script that will be executed after binding is assigned or de-assigned. Internal `global` variables that can be used in the script: | ||
- bindingBound - set to `1` if bound, otherwise set to `0` | ||
- bindingServerName - dhcp server name | ||
- bindingDUID - DUID | ||
- bindingAddress - active address | ||
- bindingPrefix - active prefix. | ||
- `comment` (String) | ||
- `dhcp_option` (Set of String) Add additional DHCP options from option list. | ||
- `disabled` (Boolean) | ||
- `insert_queue_before` (String) Specify where to place dynamic simple queue entries for static DCHP leases with a rate-limit parameter set. | ||
- `lease_time` (String) The time that a client may use the assigned address. The client will try to renew this address after half of this time and will request a new address after the time limit expires. | ||
- `parent_queue` (String) A dynamically created queue for this lease will be configured as a child queue of the specified parent queue. | ||
- `preference` (Number) | ||
- `rapid_commit` (Boolean) | ||
- `route_distance` (Number) Distance of the route. | ||
- `use_radius` (Boolean) Whether to use RADIUS server. | ||
|
||
### Read-Only | ||
|
||
- `duid` (String) DUID value. | ||
- `dynamic` (Boolean) Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified. | ||
- `id` (String) The ID of this resource. | ||
- `invalid` (Boolean) | ||
|
||
## 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 [/ipv6/dhcp/server get [print show-ids]] | ||
terraform import routeros_ipv6_dhcp_server.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ipv6_dhcp_server.test "name=test-dhcpv6" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# routeros_ipv6_dhcp_server_option (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_ipv6_dhcp_server_option" "test" { | ||
name = "domain-search" | ||
code = 24 | ||
value = "0x07'example'0x05'local'0x00" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `code` (Number) Dhcp option [code](https://www.ipamworldwide.com/ipam/isc-dhcpv6-options.html). | ||
- `name` (String) Descriptive name of the option. | ||
|
||
### Optional | ||
|
||
- `comment` (String) | ||
- `value` (String) Parameter's value. Available data types for options are: | ||
- `'test'` -> ASCII to Hex 0x74657374 | ||
- `'10.10.10.10'` -> Unicode IP to Hex 0x0a0a0a0a | ||
- `s'10.10.10.10'` -> ASCII to Hex 0x31302e31302e31302e3130 | ||
- `s'160'` -> ASCII to Hex 0x313630 | ||
- `'10'` -> Decimal to Hex 0x0a | ||
- `0x0a0a` -> No conversion | ||
- `$(VARIABLE)` -> hardcoded values | ||
|
||
RouterOS has predefined variables that can be used: | ||
- `HOSTNAME` - client hostname | ||
- `RADIUS_MT_STR1` - from radius MT attr nr. `24` | ||
- `RADIUS_MT_STR2` - from radius MT attr nr. `25` | ||
- `REMOTE_ID` - agent remote-id | ||
- `NETWORK_GATEWAY - the first gateway from `/ip dhcp-server network`, note that this option won't work if used from lease. | ||
|
||
Now it is also possible to combine data types into one, for example: `0x01'vards'$(HOSTNAME)`For example if HOSTNAME is 'kvm', then raw value will be 0x0176617264736b766d. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `raw_value` (String) Read-only field which shows raw DHCP option value (the format actually sent out). | ||
|
||
## 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 [/ipv6/dhcp/server/option get [print show-ids]] | ||
terraform import routeros_ipv6_dhcp_server_option.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ipv6_dhcp_server_option.test "name=domain-search" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# routeros_ipv6_dhcp_server_option_sets (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_ipv6_dhcp_server_option" "domain-search" { | ||
name = "domain-search" | ||
code = 24 | ||
value = "0x07'example'0x05'local'0x00" | ||
} | ||
resource "routeros_ipv6_dhcp_server_option_sets" "test" { | ||
name = "test-set" | ||
options = [routeros_ipv6_dhcp_server_option.domain-search.name] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the DHCPv6 option. | ||
|
||
### Optional | ||
|
||
- `comment` (String) | ||
- `options` (Set of String) The list of options. | ||
|
||
### 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 [/ipv6/dhcp/server/option/sets get [print show-ids]] | ||
terraform import routeros_ipv6_dhcp_server_option_sets.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ipv6_dhcp_server_option_sets.test "name=test-set" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# routeros_ipv6_pool (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_ipv6_pool" "test" { | ||
name = "test-pool" | ||
prefix = "2001:db8:12::/48" | ||
prefix_length = 64 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Descriptive name of the pool. | ||
- `prefix_length` (Number) The option represents the prefix size that will be given out to the client. | ||
|
||
### Optional | ||
|
||
- `prefix` (String) Ipv6 address prefix. | ||
|
||
### Read-Only | ||
|
||
- `dynamic` (Boolean) Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified. | ||
- `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 [/ipv6/pool get [print show-ids]] | ||
terraform import routeros_ipv6_pool.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ipv6_pool.test "name=test-pool" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters