opnsense_ipsec_auth_local (Resource)
IPsec AuthLocal Resources are used for phase 1 authentication of IPsec VPN connections.
Example Usage
// Small example
resource "opnsense_ipsec_connection" "example" {
enabled = "1"
proposals = ["default"]
unique = "no"
aggressive = "0"
version = "2"
mobike = "1"
local_addresses = ["192.168.1.1"]
remote_addresses = ["10.0.0.1"]
local_port = ""
remote_port = ""
udp_encapsulation = "0"
reauthentication_time = "3600"
rekey_time = "1800"
ike_lifetime = "3600"
dpd_delay = "10"
dpd_timeout = "60"
send_certificate_request = "1"
send_certificate = "ifasked"
keying_tries = "1"
description = "Test IPsec Connection"
}
resource "opnsense_ipsec_auth_remote" "example" {
enabled = "1"
ipsec_connection = opnsense_ipsec_connection.example.id
round = "0"
authentication = "psk"
auth_id = "auth-mail@tld.com"
eap_id = ""
certificates = []
public_keys = []
description = "Test IPsec Auth Local"
}
Schema
Required
authentication(String) Authentication method for the AuthLocal Resource.ipsec_connection(String) The parent connection UUID.
Optional
auth_id(String) Authentication ID for the AuthLocal Resource.certificates(Set of String) List of certificates for the AuthLocal Resource.description(String) Optional description for the AuthLocal Resource.eap_id(String) EAP ID for the AuthLocal Resource.enabled(String) Enable or disable the AuthLocal Resource.public_keys(Set of String) List of public keys for the AuthLocal Resource.round(String) Authentication round for the AuthLocal Resource.
Read-Only
id(String) UUID of the resource.
Import
In Terraform v1.5.0 and later, use an import block to import opnsense_ipsec_auth_local using the id. For example:
import {
to = opnsense_ipsec_auth_local.example
id = "<opnsense-resource-id>"
}
Using terraform import, import opnsense_ipsec_auth_local using the id. For example:
% terraform import opnsense_ipsec_auth_local.example <opnsense-resource-id>