wireguards
Creates, updates, deletes, gets or lists a wireguards resource.
Overview​
| Name | wireguards |
| Type | Resource |
| Id | ovh.over_the_box.wireguards |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
endpoint | object | Wireguard server connection endpoint |
max_peer_active | integer | Maximum peers simultaneously active (wire: maxPeerActive) |
max_peer_allowed | integer | Maximum peers simultaneously configured (wire: maxPeerAllowed) |
private_ipv_4 | string (ipv4-block) | Wireguard server private IP block (example: 192.0.2.0/24) (wire: privateIpv4) |
public_key | string | Wireguard server public key (wire: publicKey) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Returns the WireGuard server configuration: its public key, private IPv4 block, connection endpoint (IPv4 and port), and the maximum number of peers configured and simultaneously active. (Beta version) | |
regenerate | exec | serviceName | Regenerates the key of the WireGuard server of the service, which changes the server public key the peers use. Returns the task that performs the change. (Beta version) | |
reset | exec | serviceName | Resets the WireGuard configuration of the service to its default. Returns the task that performs the reset. (Beta version) |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
SELECT examples​
- get
Returns the WireGuard server configuration: its public key, private IPv4 block, connection endpoint (IPv4 and port), and the maximum number of peers configured and simultaneously active. (Beta version)
SELECT
endpoint,
max_peer_active,
max_peer_allowed,
private_ipv_4,
public_key
FROM ovh.over_the_box.wireguards
WHERE service_name = '{{ service_name }}' -- required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- regenerate
- reset
Regenerates the key of the WireGuard server of the service, which changes the server public key the peers use. Returns the task that performs the change. (Beta version)
EXEC ovh.over_the_box.wireguards.regenerate
@serviceName='{{ serviceName }}' --required
;
Resets the WireGuard configuration of the service to its default. Returns the task that performs the reset. (Beta version)
EXEC ovh.over_the_box.wireguards.reset
@serviceName='{{ serviceName }}' --required
;