opnsense_ipsec_psk (Resource)

IPsec Pre-Shared Keys (PSKs) are used for authenticating IPsec VPN connections.

Example Usage

// Small example
resource "opnsense_ipsec_psk" "example" {
  identity_local  = "psk-mail@tld.com"
  identity_remote = "1.2.3.4"
  type            = "PSK"
  pre_shared_key  = "someSuperSecretKey"
  description     = "Example IPsec PSK"
}

Schema

Required

  • identity_local (String) Local identity for the PSK.
  • identity_remote (String) Remote identity for the PSK.
  • pre_shared_key (String) The pre-shared key used for authentication.

Optional

  • description (String) Optional description for the PSK.
  • type (String) Type of the pre-shared key. Valid values are 'PSK' (traditional pre-shared key) or 'EAP' (for EAP-MSCHAPv2 authentication).

Read-Only

  • id (String) UUID of the resource.

Import

In Terraform v1.5.0 and later, use an import block to import opnsense_ipsec_psk using the id. For example:

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

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

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