-
Notifications
You must be signed in to change notification settings - Fork 63
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 #575 from terraform-routeros/vaerh/ipsec
- Loading branch information
Showing
49 changed files
with
2,044 additions
and
185 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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/identity get [print show-ids]] | ||
terraform import routeros_ip_ipsec_identity.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_identity.test "peer=NordVPN" |
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,21 @@ | ||
resource "routeros_ip_ipsec_mode_config" "test" { | ||
name = "NordVPN" | ||
responder = false | ||
} | ||
|
||
resource "routeros_ip_ipsec_peer" "test" { | ||
address = "lv20.nordvpn.com" | ||
exchange_mode = "ike2" | ||
name = "NordVPN" | ||
} | ||
|
||
resource "routeros_ip_ipsec_identity" "test" { | ||
auth-method = "eap" | ||
certificate = "" | ||
eap-methods = "eap-mschapv2" | ||
generate-policy = "port-strict" | ||
mode-config = routeros_ip_ipsec_mode_config.test.name | ||
peer = routeros_ip_ipsec_peer.test.name | ||
username = "[email protected]" | ||
password = "secret" | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/key get [print show-ids]] | ||
terraform import routeros_ip_ipsec_key.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_key.test "name=test-key" |
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_ip_ipsec_key" "test" { | ||
name = "test-key" | ||
key_size = 2048 | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/mode/config get [print show-ids]] | ||
terraform import routeros_ip_ipsec_mode_config.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_mode_config.test "address=1.2.3.4" |
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,6 @@ | ||
resource "routeros_ip_ipsec_mode_config" "test" { | ||
name = "test-cfg" | ||
address = "1.2.3.4" | ||
split_include = ["0.0.0.0/0"] | ||
split_dns = ["1.1.1.1"] | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/peer get [print show-ids]] | ||
terraform import routeros_ip_ipsec_peer.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_peer.test "name=NordVPN" |
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,5 @@ | ||
resource "routeros_ip_ipsec_peer" "test" { | ||
address = "lv20.nordvpn.com" | ||
exchange_mode = "ike2" | ||
name = "NordVPN" | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/policy get [print show-ids]] | ||
terraform import routeros_ip_ipsec_policy.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_policy.test "group=test-group" |
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,11 @@ | ||
resource "routeros_ip_ipsec_policy_group" "group-for-policy" { | ||
name = "test-group" | ||
} | ||
|
||
resource "routeros_ip_ipsec_policy" "policy" { | ||
dst_address = "0.0.0.0/0" | ||
group = routeros_ip_ipsec_policy_group.group-for-policy.name | ||
proposal = "NordVPN" | ||
src_address = "0.0.0.0/0" | ||
template = 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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/policy/group get [print show-ids]] | ||
terraform import routeros_ip_ipsec_policy_group.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_policy_group.test "name=test-group" |
3 changes: 3 additions & 0 deletions
3
examples/resources/routeros_ip_ipsec_policy_group/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,3 @@ | ||
resource "routeros_ip_ipsec_policy_group" "test" { | ||
name = "test-group" | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/profile get [print show-ids]] | ||
terraform import routeros_ip_ipsec_profile.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_profile.test "name=test-profile" |
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,7 @@ | ||
resource "routeros_ip_ipsec_profile" "test" { | ||
name = "test-profile" | ||
hash_algorithm = "sha256" | ||
enc_algorithm = ["aes-192", "aes-256"] | ||
dh_group = ["ecp384", "ecp521"] | ||
nat_traversal = false | ||
} |
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,5 @@ | ||
#The ID can be found via API or the terminal | ||
#The command for the terminal is -> :put [/ip/ipsec/proposal get [print show-ids]] | ||
terraform import routeros_ip_ipsec_proposal.test *3 | ||
#Or you can import a resource using one of its attributes | ||
terraform import routeros_ip_ipsec_proposal.test "name=NordVPN" |
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,5 @@ | ||
resource "routeros_ip_ipsec_proposal" "test" { | ||
name = "NordVPN" | ||
pfs_group = "none" | ||
lifetime = "45m10s" | ||
} |
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_ip_ipsec_settings.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "routeros_ip_ipsec_settings" "test" { | ||
xauth_use_radius = true | ||
interim_update = "60s" | ||
} |
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 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
Oops, something went wrong.