opnsense_ipsec_auth_remote (Resource)

IPsec AuthRemote 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              = "Example 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      = "Example IPsec Auth Remote"
}

Schema

Required

  • authentication (String) Authentication method for the AuthRemote Resource.
  • ipsec_connection (String) The parent connection UUID.

Optional

  • auth_id (String) Authentication ID for the AuthRemote Resource.
  • certificates (Set of String) List of certificates for the AuthRemote Resource.
  • description (String) Optional description for the AuthRemote Resource.
  • eap_id (String) EAP ID for the AuthRemote Resource.
  • enabled (String) Enable or disable the AuthRemote Resource.
  • public_keys (Set of String) List of public keys for the AuthRemote Resource.
  • round (String) Authentication round for the AuthRemote 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_remote using the id. For example:

import {
  to = opnsense_ipsec_auth_remote.example
  id = "<opnsense-resource-id>"
}

Using terraform import, import opnsense_ipsec_auth_remote using the id. For example:

% terraform import opnsense_ipsec_auth_remote.example <opnsense-resource-id>