Skip to content

Commit

Permalink
docs(switch): Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed Jan 15, 2024
1 parent 163ebbe commit 0f3f490
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/host get [print show-ids]]
terraform import routeros_interface_ethernet_switch_host.test *0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "routeros_interface_ethernet_switch_host" "test" {
switch = "switch1"
mac_address = "00:00:00:00:00:00"
ports = ["ether1"]
mirror = true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/port get [print show-ids]]
terraform import routeros_interface_ethernet_switch_port.test *1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "routeros_interface_ethernet_switch_port" "test" {
name = "ether1"
vlan_mode = "check"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/port-isolation get [print show-ids]]
terraform import routeros_interface_ethernet_switch_port_isolation.test *1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "routeros_interface_ethernet_switch_port_isolation" "test" {
name = "ether1"
forwarding_override = "ether1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/rule get [print show-ids]]
terraform import routeros_interface_ethernet_switch_rule.test *0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "routeros_interface_ethernet_switch_rule" "test" {
switch = "switch1"
ports = ["ether1"]
copy_to_cpu = true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/vlan get [print show-ids]]
terraform import routeros_interface_ethernet_switch_vlan.test *0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "routeros_interface_ethernet_switch_vlan" "test" {
switch = "switch1"
ports = ["ether1"]
vlan_id = 10
independent_learning = true
}

0 comments on commit 0f3f490

Please sign in to comment.