-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from terraform-routeros/capsman
feat: CAPsMAN resource support
- Loading branch information
Showing
87 changed files
with
2,072 additions
and
1,007 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import routeros_capsman_aaa.test_3a . |
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,4 @@ | ||
resource "routeros_capsman_aaa" "test_3a" { | ||
called_format = "ssid" | ||
mac_mode = "as-username-and-password" | ||
} |
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,2 @@ | ||
# Import with the name of the CAPsMAN channel configuration in case of the example use test-channel-config | ||
terraform import routeros_capsman_channel.test_channel test-channel-config |
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,13 @@ | ||
resource "routeros_capsman_channel" "test_channel" { | ||
name = "test_channel" | ||
comment = "test_channel" | ||
band = "2ghz-b/g/n" | ||
control_channel_width = "10mhz" | ||
extension_channel = "eCee" | ||
frequency = 2412 | ||
reselect_interval = "1h" | ||
save_selected = true | ||
secondary_frequency = "disabled" | ||
skip_dfs_channels = true | ||
tx_power = 20 | ||
} |
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,2 @@ | ||
# Import with the name of the CAPsMAN configuration in case of the example use test_configuration_name | ||
terraform import routeros_capsman_configuration.test_configuration_2 test_configuration_name |
101 changes: 101 additions & 0 deletions
101
examples/resources/routeros_capsman_configuration/resource.tf
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,101 @@ | ||
resource "routeros_capsman_configuration" "test_configuration" { | ||
comment = "Comment" | ||
country = "no_country_set" | ||
disconnect_timeout = "1s150ms" | ||
distance = "indoors" | ||
frame_lifetime = "0.12" // 120ms | ||
guard_interval = "long" | ||
hide_ssid = true | ||
hw_protection_mode = "rts-cts" | ||
hw_retries = 1 | ||
installation = "indoor" | ||
keepalive_frames = "enabled" | ||
load_balancing_group = "" | ||
max_sta_count = 1 | ||
mode = "ap" | ||
multicast_helper = "full" | ||
name = "test_configuration" | ||
rx_chains = [1, 3] | ||
ssid = "SSID" | ||
tx_chains = [0, 2] | ||
} | ||
|
||
resource "routeros_capsman_channel" "test_channel" { | ||
name = "test-channel-config" | ||
} | ||
|
||
resource "routeros_capsman_datapath" "test_datapath" { | ||
name = "test-datapath-config" | ||
} | ||
|
||
resource "routeros_capsman_rates" "test_rates" { | ||
name = "test-rates-config" | ||
} | ||
|
||
resource "routeros_capsman_security" "test_security" { | ||
name = "test-security-config" | ||
} | ||
|
||
resource "routeros_capsman_configuration" "test_configuration_2" { | ||
name = "test_configuration_name" | ||
|
||
channel = { | ||
config = "${routeros_capsman_channel.test_channel.name}" | ||
band = "2ghz-b/g/n" | ||
control_channel_width = "10mhz" | ||
extension_channel = "eCee" | ||
frequency = 2412 | ||
reselect_interval = "1h" | ||
save_selected = "true" | ||
secondary_frequency = "disabled" | ||
skip_dfs_channels = "true" | ||
tx_power = 20 | ||
} | ||
|
||
datapath = { | ||
config = "${routeros_capsman_datapath.test_datapath.name}" | ||
arp = "local-proxy-arp" | ||
bridge = "bridge" | ||
bridge_cost = "100" | ||
bridge_horizon = "200" | ||
client_to_client_forwarding = "true" | ||
interface_list = "static" | ||
l2mtu = "1450" | ||
local_forwarding = "true" | ||
mtu = "1500" | ||
vlan_id = "101" | ||
vlan_mode = "no-tag" | ||
// openflow_switch = "aaa" | ||
} | ||
|
||
rates = { | ||
config = "${routeros_capsman_rates.test_rates.name}" | ||
basic = "1Mbps,5.5Mbps,6Mbps,18Mbps,36Mbps,54Mbps" | ||
ht_basic_mcs = "mcs-0,mcs-7,mcs-11,mcs-14,mcs-16,mcs-21" | ||
ht_supported_mcs = "mcs-3,mcs-8,mcs-10,mcs-13,mcs-17,mcs-18" | ||
supported = "2Mbps,11Mbps,9Mbps,12Mbps,24Mbps,48Mbps" | ||
vht_basic_mcs = "none" | ||
vht_supported_mcs = "mcs0-9,mcs0-7" | ||
} | ||
|
||
security = { | ||
config = "${routeros_capsman_security.test_security.name}" | ||
authentication_types = "wpa-psk,wpa-eap" | ||
disable_pmkid = "true" | ||
eap_methods = "eap-tls,passthrough" | ||
eap_radius_accounting = "true" | ||
encryption = "aes-ccm,tkip" | ||
group_encryption = "aes-ccm" | ||
group_key_update = "1h" | ||
passphrase = "AAAAAAAAA" | ||
tls_certificate = "none" | ||
tls_mode = "verify-certificate" | ||
} | ||
|
||
depends_on = [ | ||
routeros_capsman_channel.test_channel, | ||
routeros_capsman_datapath.test_datapath, | ||
routeros_capsman_rates.test_rates, | ||
routeros_capsman_security.test_security | ||
] | ||
} |
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,2 @@ | ||
# Import with the name of the CAPsMAN datapath configuration in case of the example use test-datapath-config | ||
terraform import routeros_capsman_datapath.test_datapath test-datapath-config |
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,16 @@ | ||
resource "routeros_capsman_datapath" "test_datapath" { | ||
name = "test_datapath" | ||
comment = "test_datapath" | ||
arp = "local-proxy-arp" | ||
bridge = "bridge" | ||
bridge_cost = 100 | ||
bridge_horizon = 200 | ||
client_to_client_forwarding = true | ||
interface_list = "static" | ||
l2mtu = 1450 | ||
local_forwarding = true | ||
mtu = 1500 | ||
vlan_id = 101 | ||
vlan_mode = "no-tag" | ||
// openflow_switch = "aaa" | ||
} |
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 @@ | ||
terraform import routeros_capsman_manager.test_manager . |
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,4 @@ | ||
resource "routeros_capsman_manager" "test_manager" { | ||
enabled = true | ||
upgrade_policy = "require-same-version" | ||
} |
3 changes: 3 additions & 0 deletions
3
examples/resources/routeros_capsman_manager_interface/import.sh
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,3 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/caps-man/manager/interface get [print show-ids]] | ||
terraform import routeros_capsman_manager_interface.test_manager_interface "*6" |
4 changes: 4 additions & 0 deletions
4
examples/resources/routeros_capsman_manager_interface/resource.tf
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,4 @@ | ||
resource "routeros_capsman_manager_interface" "test_manager_interface" { | ||
interface = "ether1" | ||
forbid = true | ||
} |
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,3 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/caps-man/provisioning get [print show-ids]] | ||
terraform import routeros_capsman_provisioning.test_provisioning "*B" |
13 changes: 13 additions & 0 deletions
13
examples/resources/routeros_capsman_provisioning/resource.tf
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,13 @@ | ||
resource "routeros_capsman_configuration" "test_configuration" { | ||
name = "cfg1" | ||
} | ||
|
||
resource "routeros_capsman_provisioning" "test_provisioning" { | ||
master_configuration = "cfg1" | ||
action = "create-disabled" | ||
name_prefix = "cap-" | ||
|
||
depends_on = [ | ||
routeros_capsman_configuration.test_configuration, | ||
] | ||
} |
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,2 @@ | ||
# Import with the name of the CAPsMAN rates configuration in case of the example use test-rates-config | ||
terraform import routeros_capsman_rates.test_rates test-rates-config |
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,10 @@ | ||
resource "routeros_capsman_rates" "test_rates" { | ||
name = "test_rates" | ||
comment = "test_rates" | ||
basic = ["1Mbps", "5.5Mbps", "6Mbps", "18Mbps", "36Mbps", "54Mbps"] | ||
ht_basic_mcs = ["mcs-0", "mcs-7", "mcs-11", "mcs-14", "mcs-16", "mcs-21"] | ||
ht_supported_mcs = ["mcs-3", "mcs-8", "mcs-10", "mcs-13", "mcs-17", "mcs-18"] | ||
supported = ["2Mbps", "11Mbps", "9Mbps", "12Mbps", "24Mbps", "48Mbps"] | ||
vht_basic_mcs = "none" | ||
vht_supported_mcs = "mcs0-9,mcs0-7" | ||
} |
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,2 @@ | ||
# Import with the name of the CAPsMAN security profile in case of the example use test-security-config | ||
terraform import routeros_capsman_security.test_security test-security-config |
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,14 @@ | ||
resource "routeros_capsman_security" "test_security" { | ||
name = "test_security" | ||
comment = "test_security" | ||
authentication_types = ["wpa-psk", "wpa-eap", "wpa2-psk"] | ||
disable_pmkid = true | ||
eap_methods = "eap-tls,passthrough" | ||
eap_radius_accounting = true | ||
encryption = ["tkip", "aes-ccm"] | ||
group_encryption = "aes-ccm" | ||
group_key_update = "1h" | ||
passphrase = "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE" | ||
tls_certificate = "none" | ||
tls_mode = "verify-certificate" | ||
} |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
#The system identity can not be imported. | ||
#Terraform will ignore the current name and will overwrite the current with the one defined in Terraform. | ||
terraform import routeros_system_identity.identity . |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.