Skip to content

Commit

Permalink
Use defaultaware wrapper for docs (#205)
Browse files Browse the repository at this point in the history
* use default-aware type wrappers for attributes with default values

* re-generate docs
  • Loading branch information
maksym-nazarenko authored Sep 21, 2023
1 parent f780da3 commit 64f0275
Show file tree
Hide file tree
Showing 24 changed files with 506 additions and 390 deletions.
28 changes: 14 additions & 14 deletions docs/resources/bgp_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ resource "mikrotik_bgp_instance" "instance" {

### Optional

- `client_to_client_reflection` (Boolean) In case this instance is a route reflector: whether to redistribute routes learned from one routing reflection client to other clients.
- `cluster_id` (String) In case this instance is a route reflector: cluster ID of the router reflector cluster this instance belongs to.
- `comment` (String) The comment of the BGP instance to be created.
- `confederation` (Number) In case of BGP confederations: autonomous system number that identifies the [local] confederation as a whole.
- `confederation_peers` (String) List of AS numbers internal to the [local] confederation. For example: `10,20,30-50`.
- `disabled` (Boolean) Whether instance is disabled.
- `ignore_as_path_len` (Boolean) Whether to ignore AS_PATH attribute in BGP route selection algorithm.
- `out_filter` (String) Output routing filter chain used by all BGP peers belonging to this instance.
- `redistribute_connected` (Boolean) If enabled, this BGP instance will redistribute the information about connected routes.
- `redistribute_ospf` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by OSPF.
- `redistribute_other_bgp` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by other BGP instances.
- `redistribute_rip` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by RIP.
- `redistribute_static` (Boolean) If enabled, the router will redistribute the information about static routes added to its routing database.
- `routing_table` (String) Name of routing table this BGP instance operates on.
- `client_to_client_reflection` (Boolean) In case this instance is a route reflector: whether to redistribute routes learned from one routing reflection client to other clients. Default: `true`.
- `cluster_id` (String) In case this instance is a route reflector: cluster ID of the router reflector cluster this instance belongs to. Default: `""`.
- `comment` (String) The comment of the BGP instance to be created. Default: `""`.
- `confederation` (Number) In case of BGP confederations: autonomous system number that identifies the [local] confederation as a whole. Default: `0`.
- `confederation_peers` (String) List of AS numbers internal to the [local] confederation. For example: `10,20,30-50`. Default: `""`.
- `disabled` (Boolean) Whether instance is disabled. Default: `false`.
- `ignore_as_path_len` (Boolean) Whether to ignore AS_PATH attribute in BGP route selection algorithm. Default: `false`.
- `out_filter` (String) Output routing filter chain used by all BGP peers belonging to this instance. Default: `""`.
- `redistribute_connected` (Boolean) If enabled, this BGP instance will redistribute the information about connected routes. Default: `false`.
- `redistribute_ospf` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by OSPF. Default: `false`.
- `redistribute_other_bgp` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by other BGP instances. Default: `false`.
- `redistribute_rip` (Boolean) If enabled, this BGP instance will redistribute the information about routes learned by RIP. Default: `false`.
- `redistribute_static` (Boolean) If enabled, the router will redistribute the information about static routes added to its routing database. Default: `false`.
- `routing_table` (String) Name of routing table this BGP instance operates on. Default: `""`.

### Read-Only

Expand Down
18 changes: 9 additions & 9 deletions docs/resources/bgp_peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ resource "mikrotik_bgp_peer" "peer" {

### Optional

- `address_families` (String) The list of address families about which this peer will exchange routing information.
- `address_families` (String) The list of address families about which this peer will exchange routing information. Default: `ip`.
- `allow_as_in` (Number) How many times to allow own AS number in AS-PATH, before discarding a prefix.
- `as_override` (Boolean) If set, then all instances of remote peer's AS number in BGP AS PATH attribute are replaced with local AS number before sending route update to that peer.
- `as_override` (Boolean) If set, then all instances of remote peer's AS number in BGP AS PATH attribute are replaced with local AS number before sending route update to that peer. Default: `false`.
- `cisco_vpls_nlri_len_fmt` (String) VPLS NLRI length format type.
- `comment` (String) The comment of the BGP peer to be created.
- `default_originate` (String) The comment of the BGP peer to be created.
- `disabled` (Boolean) Whether peer is disabled.
- `hold_time` (String) Specifies the BGP Hold Time value to use when negotiating with peer
- `default_originate` (String) The comment of the BGP peer to be created. Default: `never`.
- `disabled` (Boolean) Whether peer is disabled. Default: `false`.
- `hold_time` (String) Specifies the BGP Hold Time value to use when negotiating with peer Default: `3m`.
- `in_filter` (String) The name of the routing filter chain that is applied to the incoming routing information.
- `instance` (String) The name of the instance this peer belongs to. See Mikrotik bgp instance resource.
- `instance` (String) The name of the instance this peer belongs to. See Mikrotik bgp instance resource. Default: `default`.
- `keepalive_time` (String)
- `max_prefix_limit` (Number) Maximum number of prefixes to accept from a specific peer.
- `max_prefix_restart_time` (String) Minimum time interval after which peers can reestablish BGP session.
- `multihop` (Boolean) Specifies whether the remote peer is more than one hop away.
- `nexthop_choice` (String) Affects the outgoing NEXT_HOP attribute selection, either: 'default', 'force-self', or 'propagate'
- `nexthop_choice` (String) Affects the outgoing NEXT_HOP attribute selection, either: 'default', 'force-self', or 'propagate' Default: `default`.
- `out_filter` (String) The name of the routing filter chain that is applied to the outgoing routing information.
- `passive` (Boolean) Name of the routing filter chain that is applied to the outgoing routing information.
- `passive` (Boolean) Name of the routing filter chain that is applied to the outgoing routing information. Default: `false`.
- `remote_port` (Number) Remote peers port to establish tcp session.
- `remove_private_as` (Boolean) If set, then BGP AS-PATH attribute is removed before sending out route update if attribute contains only private AS numbers.
- `route_reflect` (Boolean) Specifies whether this peer is route reflection client.
- `tcp_md5_key` (String) Key used to authenticate the connection with TCP MD5 signature as described in RFC 2385.
- `ttl` (String) Time To Live, the hop limit for TCP connection. This is a `string` field that can be 'default' or '0'-'255'.
- `ttl` (String) Time To Live, the hop limit for TCP connection. This is a `string` field that can be 'default' or '0'-'255'. Default: `default`.
- `update_source` (String) If address is specified, this address is used as the source address of the outgoing TCP connection.
- `use_bfd` (Boolean) Whether to use BFD protocol for fast state detection.

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "mikrotik_bridge" "bridge" {
### Optional

- `comment` (String) Short description of the interface.
- `fast_forward` (Boolean) Special and faster case of FastPath which works only on bridges with 2 interfaces (enabled by default only for new bridges).
- `fast_forward` (Boolean) Special and faster case of FastPath which works only on bridges with 2 interfaces (enabled by default only for new bridges). Default: `true`.
- `vlan_filtering` (Boolean) Globally enables or disables VLAN functionality for bridge.

### Read-Only
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dhcp_lease.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "mikrotik_dhcp_lease" "file_server" {

### Optional

- `blocked` (Boolean) Whether to block access for this DHCP client (true|false).
- `blocked` (Boolean) Whether to block access for this DHCP client (true|false). Default: `false`.
- `comment` (String) The comment of the DHCP lease to be created.

### Read-Only
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/dhcp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ resource "mikrotik_dhcp_server" "default" {
### Optional

- `add_arp` (Boolean) Whether to add dynamic ARP entry. If set to no either ARP mode should be enabled on that interface or static ARP entries should be administratively defined.
- `address_pool` (String) IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
- `authoritative` (String) Option changes the way how server responds to DHCP requests.
- `disabled` (Boolean) Disable this DHCP server instance.
- `interface` (String) Interface on which server will be running.
- `address_pool` (String) IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed. Default: `static-only`.
- `authoritative` (String) Option changes the way how server responds to DHCP requests. Default: `yes`.
- `disabled` (Boolean) Disable this DHCP server instance. Default: `true`.
- `interface` (String) Interface on which server will be running. Default: `*0`.
- `lease_script` (String) Script that will be executed after lease is assigned or de-assigned. Internal "global" variables that can be used in the script.

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/dhcp_server_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ resource "mikrotik_dhcp_server_network" "default" {
- `address` (String) The network DHCP server(s) will lease addresses from.
- `comment` (String)
- `dns_server` (String) The DHCP client will use these as the default DNS servers.
- `gateway` (String) The default gateway to be used by DHCP Client.
- `netmask` (String) The actual network mask to be used by DHCP client. If set to '0' - netmask from network address will be used.
- `gateway` (String) The default gateway to be used by DHCP Client. Default: `0.0.0.0`.
- `netmask` (String) The actual network mask to be used by DHCP client. If set to '0' - netmask from network address will be used. Default: `0`.

### Read-Only

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/firewall_filter_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ resource "mikrotik_firewall_filter_rule" "https" {

### Optional

- `action` (String) Action to take if packet is matched by the rule.
- `action` (String) Action to take if packet is matched by the rule. Default: `accept`.
- `comment` (String) Comment to the rule.
- `connection_state` (Set of String) Interprets the connection tracking analysis data for a particular packet.
- `dst_port` (String) List of destination port numbers or port number ranges.
- `in_interface` (String) Interface the packet has entered the router.
- `in_interface_list` (String) Set of interfaces defined in interface list. Works the same as in-interface.
- `out_interface_list` (String) Set of interfaces defined in interface list. Works the same as out-interface.
- `protocol` (String) Matches particular IP protocol specified by protocol name or number.
- `protocol` (String) Matches particular IP protocol specified by protocol name or number. Default: `tcp`.

### Read-Only

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/interface_wireguard.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Creates a Mikrotik interface wireguard only supported by RouterOS v7+.
### Optional

- `comment` (String) Comment associated with interface wireguard.
- `disabled` (Boolean) Boolean for whether or not the interface wireguard is disabled.
- `listen_port` (Number) Port for WireGuard service to listen on for incoming sessions.
- `mtu` (Number) Layer3 Maximum transmission unit.
- `disabled` (Boolean) Boolean for whether or not the interface wireguard is disabled. Default: `false`.
- `listen_port` (Number) Port for WireGuard service to listen on for incoming sessions. Default: `13231`.
- `mtu` (Number) Layer3 Maximum transmission unit. Default: `1420`.
- `private_key` (String, Sensitive) A base64 private key. If not specified, it will be automatically generated upon interface creation.

### Read-Only
Expand Down
14 changes: 7 additions & 7 deletions docs/resources/interface_wireguard_peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Creates a Mikrotik Interface Wireguard Peer only supported by RouterOS v7+.

### Optional

- `allowed_address` (String) List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- `comment` (String) Short description of the peer.
- `disabled` (Boolean) Boolean for whether or not the interface peer is disabled.
- `endpoint_address` (String) An endpoint IP or hostname can be left blank to allow remote connection from any address.
- `endpoint_port` (Number) An endpoint port can be left blank to allow remote connection from any port.
- `persistent_keepalive` (Number) A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- `preshared_key` (String) A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- `allowed_address` (String) List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses. Default: `""`.
- `comment` (String) Short description of the peer. Default: `""`.
- `disabled` (Boolean) Boolean for whether or not the interface peer is disabled. Default: `false`.
- `endpoint_address` (String) An endpoint IP or hostname can be left blank to allow remote connection from any address. Default: `""`.
- `endpoint_port` (Number) An endpoint port can be left blank to allow remote connection from any port. Default: `0`.
- `persistent_keepalive` (Number) A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds. Default: `0`.
- `preshared_key` (String) A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance. Default: `""`.
- `public_key` (String) The remote peer's calculated public key.

### Read-Only
Expand Down
10 changes: 5 additions & 5 deletions docs/resources/ipv6_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ resource "mikrotik_ipv6_address" "lan" {

### Optional

- `advertise` (Boolean) Whether to enable stateless address configuration. The prefix of that address is automatically advertised to hosts using ICMPv6 protocol. The option is set by default for addresses with prefix length 64.
- `advertise` (Boolean) Whether to enable stateless address configuration. The prefix of that address is automatically advertised to hosts using ICMPv6 protocol. The option is set by default for addresses with prefix length 64. Default: `false`.
- `comment` (String) The comment for the IPv6 address assignment.
- `disabled` (Boolean) Whether to disable IPv6 address.
- `eui_64` (Boolean) Whether to calculate EUI-64 address and use it as last 64 bits of the IPv6 address.
- `from_pool` (String) Name of the pool from which prefix will be taken to construct IPv6 address taking last part of the address from address property.
- `no_dad` (Boolean) If set indicates that address is anycast address and Duplicate Address Detection should not be performed.
- `disabled` (Boolean) Whether to disable IPv6 address. Default: `false`.
- `eui_64` (Boolean) Whether to calculate EUI-64 address and use it as last 64 bits of the IPv6 address. Default: `false`.
- `from_pool` (String) Name of the pool from which prefix will be taken to construct IPv6 address taking last part of the address from address property. Default: `""`.
- `no_dad` (Boolean) If set indicates that address is anycast address and Duplicate Address Detection should not be performed. Default: `false`.

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ EOF

### Optional

- `dont_require_permissions` (Boolean) If the script requires permissions or not.
- `dont_require_permissions` (Boolean) If the script requires permissions or not. Default: `false`.

### Read-Only

Expand Down
10 changes: 5 additions & 5 deletions docs/resources/vlan_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ resource "mikrotik_vlan_interface" "default" {

### Optional

- `disabled` (Boolean) Whether to create the interface in disabled state.
- `interface` (String) Name of physical interface on top of which VLAN will work.
- `mtu` (Number) Layer3 Maximum transmission unit.
- `use_service_tag` (Boolean) 802.1ad compatible Service Tag.
- `vlan_id` (Number) Virtual LAN identifier or tag that is used to distinguish VLANs. Must be equal for all computers that belong to the same VLAN.
- `disabled` (Boolean) Whether to create the interface in disabled state. Default: `false`.
- `interface` (String) Name of physical interface on top of which VLAN will work. Default: `*0`.
- `mtu` (Number) Layer3 Maximum transmission unit. Default: `1500`.
- `use_service_tag` (Boolean) 802.1ad compatible Service Tag. Default: `false`.
- `vlan_id` (Number) Virtual LAN identifier or tag that is used to distinguish VLANs. Must be equal for all computers that belong to the same VLAN. Default: `1`.

### Read-Only

Expand Down
Loading

0 comments on commit 64f0275

Please sign in to comment.