-
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
fe25d3f
commit 7229c55
Showing
6 changed files
with
208 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# routeros_system_routerboard (Data Source) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
data "routeros_system_routerboard" "data" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
|
||
### Read-Only | ||
|
||
- `current_firmware` (String) | ||
- `factory_firmware` (String) | ||
- `firmware_type` (String) | ||
- `id` (String) The ID of this resource. | ||
- `model` (String) | ||
- `routerboard` (Boolean) | ||
- `serial_number` (String) | ||
- `upgrade_firmware` (String) | ||
|
||
|
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,81 @@ | ||
# Certificate rotation | ||
|
||
Original [issue](https://github.com/terraform-routeros/terraform-provider-routeros/issues/584) | ||
|
||
## Example | ||
```terraform | ||
resource "tls_private_key" "ca_key" { | ||
algorithm = "RSA" | ||
} | ||
resource "tls_self_signed_cert" "ca_cert" { | ||
subject { | ||
common_name = "testCA" | ||
organization = "test" | ||
} | ||
private_key_pem = tls_private_key.ca_key.private_key_pem | ||
allowed_uses = ["digital_signature", "cert_signing", "crl_signing"] | ||
validity_period_hours = 24 * 365 * 5 | ||
is_ca_certificate = true | ||
} | ||
resource "tls_private_key" "server_key" { | ||
algorithm = "RSA" | ||
} | ||
resource "tls_cert_request" "server_csr" { | ||
private_key_pem = tls_private_key.server_key.private_key_pem | ||
subject { | ||
common_name = "mikrotik.example.com" | ||
organization = "test" | ||
} | ||
} | ||
resource "tls_locally_signed_cert" "server_cert" { | ||
cert_request_pem = tls_cert_request.server_csr.cert_request_pem | ||
ca_private_key_pem = tls_private_key.ca_key.private_key_pem | ||
ca_cert_pem = tls_self_signed_cert.ca_cert.cert_pem | ||
validity_period_hours = 12 | ||
allowed_uses = [ | ||
"key_encipherment", | ||
"digital_signature", | ||
"server_auth", | ||
] | ||
} | ||
output "cert_serial_number_expected" { | ||
value = format("%x", tls_locally_signed_cert.server_cert.id) | ||
} | ||
resource "routeros_file" "server_key" { | ||
name = "server.key" | ||
contents = tls_private_key.server_key.private_key_pem | ||
} | ||
resource "routeros_file" "server_cert" { | ||
name = "server.crt" | ||
contents = tls_locally_signed_cert.server_cert.cert_pem | ||
} | ||
resource “routeros_system_certificate” “server_cert” { | ||
name = “server” | ||
common_name = tls_cert_request.server_csr.subject[0].common_name | ||
import { | ||
cert_file_name = routeros_file.server_cert.name | ||
key_file_name = routeros_file.server_key.name | ||
} | ||
depends_on = [routeros_file.server_cert, routeros_file.server_key] | ||
lifecycle { | ||
replace_triggered_by = [ | ||
tls_locally_signed_cert.server_cert.cert_pem | ||
] | ||
} | ||
} | ||
output "cert_serial_nubmer_on_device" { | ||
value = routeros_system_certificate.server_cert.serial_number | ||
} | ||
``` |
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,50 @@ | ||
# routeros_interface_vxlan (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_interface_vxlan" "test" { | ||
name = "vxlan1-test" | ||
vni = 10 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the interface. | ||
|
||
### Optional | ||
|
||
- `allow_fast_path` (Boolean) Whether to allow Fast Path processing. Fragmented and flooded packets over VXLAN are redirected via a slow path. Fast Path is disabled for VXLAN interface that uses IPv6 VTEP version or VRF. The setting is available since RouterOS version 7.8. | ||
- `arp` (String) Address Resolution Protocol setting disabled - the interface will not use ARP enabled - the interface will use ARP local-proxy-arp - the router performs proxy ARP on the interface and sends replies to the same interface proxy-arp - the router performs proxy ARP on the interface and sends replies to other interfaces reply-only - the interface will only reply to requests originating from matching IP address/MAC address combinations which are entered as static entries in the IP/ARP table. No dynamic entries will be automatically stored in the IP/ARP table. Therefore for communications to be successful, a valid static entry must already exist. | ||
- `arp_timeout` (String) How long the ARP record is kept in the ARP table after no packets are received from IP. Value auto equals to the value of arp-timeout in IP/Settings, default is the 30s. | ||
- `comment` (String) | ||
- `disabled` (Boolean) | ||
- `dont_fragment` (String) The Don't Fragment (DF) flag controls whether a packet can be broken into smaller packets, called fragments, before being sent over a network. When configuring VXLAN, this setting determines the presence of the DF flag on the outer IPv4 header and can control packet fragmentation if the encapsulated packet exceeds the outgoing interface MTU. This setting has three options: disabled - the DF flag is not set on the outer IPv4 header, which means that packets can be fragmented if they are too large to be sent over the outgoing interface. This also allows packet fragmentation when VXLAN uses IPv6 underlay. enabled - the DF flag is always set on the outer IPv4 header, which means that packets will not be fragmented and will be dropped if they exceed the outgoing interface's MTU. This also avoids packet fragmentation when VXLAN uses IPv6 underlay. inherit - The DF flag on the outer IPv4 header is based on the inner IPv4 DF flag. If the inner IPv4 header has the DF flag set, the outer IPv4 header will also have it set. If the packet exceeds the outgoing interface's MTU and DF is set, it will be dropped. If the inner packet is non-IP, the outer IPv4 header will not have the DF flag set and packets can be fragmented. If the inner packet is IPv6, the outer IPv4 header will always set the DF flag and packets cannot be fragmented. Note that when VXLAN uses IPv6 underlay, this setting does not have any effect and is treated the same as disabled. The setting is available since RouterOS version 7.8. | ||
- `group` (String) When specified, a multicast group address can be used to forward broadcast, unknown-unicast, and multicast traffic between VTEPs. This property requires specifying the interface setting. The interface will use IGMP or MLD to join the specified multicast group, make sure to add the necessary PIM and IGMP/MDL configuration. When this property is set, the vteps-ip-version automatically gets updated to the used multicast IP version. | ||
- `interface` (String) Interface name used for multicast forwarding. This property requires specifying the group setting. | ||
- `local_address` (String) Specifies the local source address for the VXLAN interface. If not set, one IP address of the egress interface will be selected as a source address for VXLAN packets. When the property is set, the vteps-ip-version automatically gets updated to the used local IP version. The setting is available since RouterOS version 7.7. | ||
- `mac_address` (String) Static MAC address of the interface. A randomly generated MAC address will be assigned when not specified. | ||
- `max_fdb_size` (Number) Limits the maximum number of MAC addresses that VXLAN can store in the forwarding database (FDB). | ||
- `mtu` (String) Layer3 Maximum transmission unit ('auto', 0 .. 65535) | ||
- `port` (Number) Used UDP port number. | ||
- `vni` (Number) VXLAN Network Identifier (VNI). | ||
- `vrf` (String) The VRF table this resource operates on. | ||
- `vteps_ip_version` (String) Used IP protocol version for statically configured VTEPs. The RouterOS VXLAN interface does not support dual-stack, any configured remote VTEPs with the opposite IP version will be ignored. When multicast group or local-address properties are set, the vteps-ip-version automatically gets updated to the used IP version. The setting is available since RouterOS version 7.6. | ||
|
||
### 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 [/interface/vxlan get [print show-ids]] | ||
terraform import routeros_interface_vxlan.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_interface_vxlan.test "name=vxlan1" | ||
``` |
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_interface_vxlan_vteps (Resource) | ||
|
||
|
||
## Example Usage | ||
```terraform | ||
resource "routeros_interface_vxlan" "test-2" { | ||
name = "vxlan2-test" | ||
vni = 11 | ||
} | ||
resource "routeros_interface_vxlan_vteps" "test" { | ||
interface = routeros_interface_vxlan.test-2.name | ||
remote_ip = "192.168.10.10" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `interface` (String) Name of the interface. | ||
|
||
### Optional | ||
|
||
- `comment` (String) | ||
- `port` (Number) Used UDP port number. | ||
- `remote_ip` (String) The IPv4 or IPv6 destination address of remote VTEP. | ||
|
||
### 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 [/interface/vxlan/vteps get [print show-ids]] | ||
terraform import routeros_interface_vxlan_vteps.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_interface_vxlan_vteps.test "interface=vxlan2-test" | ||
``` |
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