Class: Pangea::Kubernetes::Types::VpnPeerConfig

Inherits:
Resources::BaseAttributes
  • Object
show all
Defined in:
lib/pangea/kubernetes/types/vpn_config.rb

Overview

VPN peer configuration for WireGuard links.

Instance Method Summary collapse

Instance Method Details

#to_hObject



22
23
24
25
26
27
28
# File 'lib/pangea/kubernetes/types/vpn_config.rb', line 22

def to_h
  hash = { public_key: public_key, allowed_ips: allowed_ips }
  hash[:endpoint] = endpoint if endpoint
  hash[:persistent_keepalive] = persistent_keepalive if persistent_keepalive
  hash[:preshared_key_file] = preshared_key_file if preshared_key_file
  hash
end