Terraform provider reference / resources / router_openvpn

fiberax_router_openvpn (Resource)

The OpenVPN tunnel of a ROUTER. ONE per router; the only thing you set is enabled. Device certificates are issued by a certificate authority the platform keeps for this router: the first switch-on creates it and takes a few seconds.

Switching the tunnel on when it is already on is harmless and USEFUL: it pushes the routes of networks attached to the router since (networks_missing) and the certificate revocation list. The provider tells you when that is needed; do it with terraform apply -replace=<this resource> (destroy touches nothing, create sends the switch-on).

The resource has no create and no delete: destroying it DOES NOT TOUCH the platform - to stop the tunnel, set enabled = false explicitly. Devices are fiberax_router_openvpn_device.

Example Usage

# The OpenVPN tunnel of a ROUTER. ONE per router; you only switch it on and off.
# The first switch-on creates the certificate authority the platform keeps for
# this router.
resource "fiberax_router_openvpn" "vpn" {
  server_id = fiberax_server.router.id
  enabled   = true
}

# Networks attached to the router AFTER the tunnel was set up are pushed to
# devices only when the tunnel is switched on again. The provider warns about
# them in the plan; re-apply the tunnel with:
#   terraform apply -replace=fiberax_router_openvpn.vpn
output "openvpn_networks_missing" {
  value = fiberax_router_openvpn.vpn.networks_missing
}

Schema

Required

Read-Only

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The import ID is the router's server ID: the tunnel has no ID of its own.
terraform import fiberax_router_openvpn.vpn 11102

Generated from the provider schema for version 0.3.0. How to install the provider: Terraform provider.