Documentation ¶
Index ¶
- Variables
- func SetIPSecGatewayData(d *schema.ResourceData, gateway vpn.IPSecGatewayRead) error
- func SetIPSecTunnelData(d *schema.ResourceData, tunnel vpn.IPSecTunnelRead) error
- func SetWireguardGWData(d *schema.ResourceData, wireguard vpnSdk.WireguardGatewayRead) error
- func SetWireguardPeerData(d *schema.ResourceData, wireguard vpn.WireguardPeerRead) error
- type Client
- func (c *Client) CreateIPSecGateway(ctx context.Context, d *schema.ResourceData) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
- func (c *Client) CreateIPSecTunnel(ctx context.Context, d *schema.ResourceData) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
- func (c *Client) CreateWireguardGateway(ctx context.Context, d *schema.ResourceData) (vpnSdk.WireguardGatewayRead, utils.ApiResponseInfo, error)
- func (c *Client) CreateWireguardGatewayPeers(ctx context.Context, d *schema.ResourceData, gatewayID string) (vpn.WireguardPeerRead, utils.ApiResponseInfo, error)
- func (c *Client) DeleteIPSecGateway(ctx context.Context, id string, location string) (utils.ApiResponseInfo, error)
- func (c *Client) DeleteIPSecTunnel(ctx context.Context, id string, gatewayID string, location string) (utils.ApiResponseInfo, error)
- func (c *Client) DeleteWireguardGateway(ctx context.Context, id, location string) (utils.ApiResponseInfo, error)
- func (c *Client) DeleteWireguardPeer(ctx context.Context, gatewayID, id, location string) (utils.ApiResponseInfo, error)
- func (c *Client) GetIPSecGatewayByID(ctx context.Context, id string, location string) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
- func (c *Client) GetIPSecTunnelByID(ctx context.Context, id string, gatewayID string, location string) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
- func (c *Client) GetWireguardGatewayByID(ctx context.Context, id, location string) (vpnSdk.WireguardGatewayRead, *shared.APIResponse, error)
- func (c *Client) GetWireguardPeerByID(ctx context.Context, gatewayID, id, location string) (vpn.WireguardPeerRead, *shared.APIResponse, error)
- func (c *Client) IsIPSecGatewayDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsIPSecGatewayReady(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsIPSecTunnelDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsIPSecTunnelReady(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardGatewayDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardGatewayReady(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardPeerAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardPeerDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsWireguardPeerReady(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) ListIPSecGateway(ctx context.Context, location string) (vpn.IPSecGatewayReadList, *shared.APIResponse, error)
- func (c *Client) ListIPSecTunnel(ctx context.Context, gatewayID string, location string) (vpn.IPSecTunnelReadList, *shared.APIResponse, error)
- func (c *Client) ListWireguardGateways(ctx context.Context, location string) (vpnSdk.WireguardGatewayReadList, *shared.APIResponse, error)
- func (c *Client) ListWireguardPeers(ctx context.Context, gatewayID, location string) (vpn.WireguardPeerReadList, *shared.APIResponse, error)
- func (c *Client) UpdateIPSecGateway(ctx context.Context, d *schema.ResourceData) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
- func (c *Client) UpdateIPSecTunnel(ctx context.Context, d *schema.ResourceData) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
- func (c *Client) UpdateWireguardGateway(ctx context.Context, id string, d *schema.ResourceData) (vpnSdk.WireguardGatewayRead, utils.ApiResponseInfo, error)
- func (c *Client) UpdateWireguardPeer(ctx context.Context, gatewayID, id string, d *schema.ResourceData) (vpn.WireguardPeerRead, utils.ApiResponseInfo, error)
Constants ¶
This section is empty.
Variables ¶
var ( // IPSecTunnelDiffieHellmanGroups is a list of supported Diffie-Hellman groups IPSecTunnelDiffieHellmanGroups = []string{"15-MODP3072", "16-MODP4096", "19-ECP256", "20-ECP384", "21-ECP521", "28-ECP256BP", "29-ECP384BP", "30-ECP512BP"} // IPSecTunnelEncryptionAlgorithms is a list of supported encryption algorithms IPSecTunnelEncryptionAlgorithms = []string{ "AES128", "AES256", "AES128-CTR", "AES256-CTR", "AES128-GCM-16", "AES256-GCM-16", "AES128-GCM-12", "AES256-GCM-12", "AES128-CCM-12", "AES256-CCM-12", } // IPSecTunnelIntegrityAlgorithms is a list of supported integrity algorithms IPSecTunnelIntegrityAlgorithms = []string{"SHA256", "SHA384", "SHA512", "AES-XCBC"} )
var ( // AvailableLocations is a list of supported locations for VPN AvailableLocations = []string{"de/fra", "de/txl"} )
Functions ¶
func SetIPSecGatewayData ¶
func SetIPSecGatewayData(d *schema.ResourceData, gateway vpn.IPSecGatewayRead) error
SetIPSecGatewayData sets the VPN IPSec Gateway data to the Terraform schema
func SetIPSecTunnelData ¶
func SetIPSecTunnelData(d *schema.ResourceData, tunnel vpn.IPSecTunnelRead) error
SetIPSecTunnelData sets the VPN IPSec Tunnel data to the terraform schema
func SetWireguardGWData ¶
func SetWireguardGWData(d *schema.ResourceData, wireguard vpnSdk.WireguardGatewayRead) error
SetWireguardGWData sets the wireguard gateway data
func SetWireguardPeerData ¶
func SetWireguardPeerData(d *schema.ResourceData, wireguard vpn.WireguardPeerRead) error
SetWireguardPeerData sets the wireguard peer data
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the VPN SDK client
func (*Client) CreateIPSecGateway ¶
func (c *Client) CreateIPSecGateway(ctx context.Context, d *schema.ResourceData) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
CreateIPSecGateway creates a new VPN IPSec Gateway
func (*Client) CreateIPSecTunnel ¶
func (c *Client) CreateIPSecTunnel(ctx context.Context, d *schema.ResourceData) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
CreateIPSecTunnel creates a new VPN IPSec Tunnel
func (*Client) CreateWireguardGateway ¶
func (c *Client) CreateWireguardGateway(ctx context.Context, d *schema.ResourceData) (vpnSdk.WireguardGatewayRead, utils.ApiResponseInfo, error)
CreateWireguardGateway creates a new wireguard gateway
func (*Client) CreateWireguardGatewayPeers ¶
func (c *Client) CreateWireguardGatewayPeers(ctx context.Context, d *schema.ResourceData, gatewayID string) (vpn.WireguardPeerRead, utils.ApiResponseInfo, error)
CreateWireguardGatewayPeers creates a new wireguard peer
func (*Client) DeleteIPSecGateway ¶
func (c *Client) DeleteIPSecGateway(ctx context.Context, id string, location string) (utils.ApiResponseInfo, error)
DeleteIPSecGateway deletes a VPN IPSec Gateway by its ID and location
func (*Client) DeleteIPSecTunnel ¶
func (c *Client) DeleteIPSecTunnel(ctx context.Context, id string, gatewayID string, location string) (utils.ApiResponseInfo, error)
DeleteIPSecTunnel deletes a VPN IPSec Tunnel using its ID and location
func (*Client) DeleteWireguardGateway ¶
func (c *Client) DeleteWireguardGateway(ctx context.Context, id, location string) (utils.ApiResponseInfo, error)
DeleteWireguardGateway deletes a wireguard gateway
func (*Client) DeleteWireguardPeer ¶
func (c *Client) DeleteWireguardPeer(ctx context.Context, gatewayID, id, location string) (utils.ApiResponseInfo, error)
DeleteWireguardPeer deletes a wireguard peer
func (*Client) GetIPSecGatewayByID ¶
func (c *Client) GetIPSecGatewayByID(ctx context.Context, id string, location string) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
GetIPSecGatewayByID retrieves a VPN IPSec Gateway by its ID and location
func (*Client) GetIPSecTunnelByID ¶
func (c *Client) GetIPSecTunnelByID(ctx context.Context, id string, gatewayID string, location string) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
GetIPSecTunnelByID retrieves a VPN IPSec Tunnel by its ID and location
func (*Client) GetWireguardGatewayByID ¶
func (c *Client) GetWireguardGatewayByID(ctx context.Context, id, location string) (vpnSdk.WireguardGatewayRead, *shared.APIResponse, error)
GetWireguardGatewayByID returns a wireguard by its ID
func (*Client) GetWireguardPeerByID ¶
func (c *Client) GetWireguardPeerByID(ctx context.Context, gatewayID, id, location string) (vpn.WireguardPeerRead, *shared.APIResponse, error)
GetWireguardPeerByID returns a wireguard by its ID
func (*Client) IsIPSecGatewayDeleted ¶
IsIPSecGatewayDeleted checks if a VPN IPSec Gateway has been deleted
func (*Client) IsIPSecGatewayReady ¶
IsIPSecGatewayReady checks if a VPN IPSec Gateway is ready to use
func (*Client) IsIPSecTunnelDeleted ¶
IsIPSecTunnelDeleted checks if a VPN IPSec Tunnel has been deleted
func (*Client) IsIPSecTunnelReady ¶
IsIPSecTunnelReady checks if a VPN IPSec Tunnel is ready to use
func (*Client) IsWireguardAvailable ¶
IsWireguardAvailable checks if the wireguard is available
func (*Client) IsWireguardGatewayDeleted ¶
func (c *Client) IsWireguardGatewayDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
IsWireguardGatewayDeleted checks if the wireguard gateway is deleted
func (*Client) IsWireguardGatewayReady ¶
IsWireguardGatewayReady checks if the wireguard gateway is ready
func (*Client) IsWireguardPeerAvailable ¶
func (c *Client) IsWireguardPeerAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)
IsWireguardPeerAvailable checks if the wireguard peer is available
func (*Client) IsWireguardPeerDeleted ¶
IsWireguardPeerDeleted checks if the wireguard peer is deleted
func (*Client) IsWireguardPeerReady ¶
IsWireguardPeerReady checks if the wireguard peer is ready
func (*Client) ListIPSecGateway ¶
func (c *Client) ListIPSecGateway(ctx context.Context, location string) (vpn.IPSecGatewayReadList, *shared.APIResponse, error)
ListIPSecGateway retrieves all VPN IPSec Gateways from a given location
func (*Client) ListIPSecTunnel ¶
func (c *Client) ListIPSecTunnel(ctx context.Context, gatewayID string, location string) (vpn.IPSecTunnelReadList, *shared.APIResponse, error)
ListIPSecTunnel retrieves all VPN IPSec Tunnels from a given gateway and location
func (*Client) ListWireguardGateways ¶
func (c *Client) ListWireguardGateways(ctx context.Context, location string) (vpnSdk.WireguardGatewayReadList, *shared.APIResponse, error)
ListWireguardGateways returns a list of all wireguards
func (*Client) ListWireguardPeers ¶
func (c *Client) ListWireguardPeers(ctx context.Context, gatewayID, location string) (vpn.WireguardPeerReadList, *shared.APIResponse, error)
ListWireguardPeers returns a list of all wireguards
func (*Client) UpdateIPSecGateway ¶
func (c *Client) UpdateIPSecGateway(ctx context.Context, d *schema.ResourceData) (vpn.IPSecGatewayRead, *shared.APIResponse, error)
UpdateIPSecGateway updates a VPN IPSec Gateway
func (*Client) UpdateIPSecTunnel ¶
func (c *Client) UpdateIPSecTunnel(ctx context.Context, d *schema.ResourceData) (vpn.IPSecTunnelRead, *shared.APIResponse, error)
UpdateIPSecTunnel updates a VPN IPSec Tunnel
func (*Client) UpdateWireguardGateway ¶
func (c *Client) UpdateWireguardGateway(ctx context.Context, id string, d *schema.ResourceData) (vpnSdk.WireguardGatewayRead, utils.ApiResponseInfo, error)
UpdateWireguardGateway updates a wireguard gateway
func (*Client) UpdateWireguardPeer ¶
func (c *Client) UpdateWireguardPeer(ctx context.Context, gatewayID, id string, d *schema.ResourceData) (vpn.WireguardPeerRead, utils.ApiResponseInfo, error)
UpdateWireguardPeer updates a wireguard peer