routeros.InterfaceWireguardPeer
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const testWgInterface = new routeros.InterfaceWireguard("testWgInterface", {listenPort: 13231});
const wgPeer = new routeros.InterfaceWireguardPeer("wgPeer", {
"interface": testWgInterface.name,
publicKey: "MY_BASE_64_PUBLIC_KEY",
allowedAddresses: [
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8",
],
});
import pulumi
import pulumi_routeros as routeros
test_wg_interface = routeros.InterfaceWireguard("testWgInterface", listen_port=13231)
wg_peer = routeros.InterfaceWireguardPeer("wgPeer",
interface=test_wg_interface.name,
public_key="MY_BASE_64_PUBLIC_KEY",
allowed_addresses=[
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testWgInterface, err := routeros.NewInterfaceWireguard(ctx, "testWgInterface", &routeros.InterfaceWireguardArgs{
ListenPort: pulumi.Float64(13231),
})
if err != nil {
return err
}
_, err = routeros.NewInterfaceWireguardPeer(ctx, "wgPeer", &routeros.InterfaceWireguardPeerArgs{
Interface: testWgInterface.Name,
PublicKey: pulumi.String("MY_BASE_64_PUBLIC_KEY"),
AllowedAddresses: pulumi.StringArray{
pulumi.String("192.168.0.0/16"),
pulumi.String("172.16.0.0/12"),
pulumi.String("10.0.0.0/8"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
return await Deployment.RunAsync(() =>
{
var testWgInterface = new Routeros.InterfaceWireguard("testWgInterface", new()
{
ListenPort = 13231,
});
var wgPeer = new Routeros.InterfaceWireguardPeer("wgPeer", new()
{
Interface = testWgInterface.Name,
PublicKey = "MY_BASE_64_PUBLIC_KEY",
AllowedAddresses = new[]
{
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.InterfaceWireguard;
import com.pulumi.routeros.InterfaceWireguardArgs;
import com.pulumi.routeros.InterfaceWireguardPeer;
import com.pulumi.routeros.InterfaceWireguardPeerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testWgInterface = new InterfaceWireguard("testWgInterface", InterfaceWireguardArgs.builder()
.listenPort("13231")
.build());
var wgPeer = new InterfaceWireguardPeer("wgPeer", InterfaceWireguardPeerArgs.builder()
.interface_(testWgInterface.name())
.publicKey("MY_BASE_64_PUBLIC_KEY")
.allowedAddresses(
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8")
.build());
}
}
resources:
testWgInterface:
type: routeros:InterfaceWireguard
properties:
listenPort: '13231'
wgPeer:
type: routeros:InterfaceWireguardPeer
properties:
interface: ${testWgInterface.name}
publicKey: MY_BASE_64_PUBLIC_KEY
allowedAddresses:
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
Create InterfaceWireguardPeer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InterfaceWireguardPeer(name: string, args: InterfaceWireguardPeerArgs, opts?: CustomResourceOptions);
@overload
def InterfaceWireguardPeer(resource_name: str,
args: InterfaceWireguardPeerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InterfaceWireguardPeer(resource_name: str,
opts: Optional[ResourceOptions] = None,
interface: Optional[str] = None,
public_key: Optional[str] = None,
allowed_addresses: Optional[Sequence[str]] = None,
endpoint_address: Optional[str] = None,
client_address: Optional[str] = None,
client_endpoint: Optional[str] = None,
client_keepalive: Optional[str] = None,
client_listen_port: Optional[float] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
___id_: Optional[float] = None,
endpoint_port: Optional[str] = None,
client_dns: Optional[str] = None,
interface_wireguard_peer_id: Optional[str] = None,
is_responder: Optional[bool] = None,
name: Optional[str] = None,
persistent_keepalive: Optional[str] = None,
preshared_key: Optional[str] = None,
private_key: Optional[str] = None,
___path_: Optional[str] = None)
func NewInterfaceWireguardPeer(ctx *Context, name string, args InterfaceWireguardPeerArgs, opts ...ResourceOption) (*InterfaceWireguardPeer, error)
public InterfaceWireguardPeer(string name, InterfaceWireguardPeerArgs args, CustomResourceOptions? opts = null)
public InterfaceWireguardPeer(String name, InterfaceWireguardPeerArgs args)
public InterfaceWireguardPeer(String name, InterfaceWireguardPeerArgs args, CustomResourceOptions options)
type: routeros:InterfaceWireguardPeer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InterfaceWireguardPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InterfaceWireguardPeerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InterfaceWireguardPeerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InterfaceWireguardPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InterfaceWireguardPeerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
InterfaceWireguardPeer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The InterfaceWireguardPeer resource accepts the following input properties:
- Allowed
Addresses List<string> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- Interface string
- Name of the interface.
- Public
Key string - The remote peer's calculated public key.
- Client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- Client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- Client
Endpoint string - The IP address and port number of the WireGuard Server.
- Client
Keepalive string - Same as persistent-keepalive but from peer side.
- Client
Listen doublePort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- Comment string
- Disabled bool
- Endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- Endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- Interface
Wireguard stringPeer Id - The ID of this resource.
- Is
Responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - Name string
- Name of the tunnel.
- Persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Allowed
Addresses []string - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- Interface string
- Name of the interface.
- Public
Key string - The remote peer's calculated public key.
- Client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- Client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- Client
Endpoint string - The IP address and port number of the WireGuard Server.
- Client
Keepalive string - Same as persistent-keepalive but from peer side.
- Client
Listen float64Port - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- Comment string
- Disabled bool
- Endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- Endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- Interface
Wireguard stringPeer Id - The ID of this resource.
- Is
Responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - Name string
- Name of the tunnel.
- Persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- allowed
Addresses List<String> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- interface_ String
- Name of the interface.
- public
Key String - The remote peer's calculated public key.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- client
Address String - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns String - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint String - The IP address and port number of the WireGuard Server.
- client
Keepalive String - Same as persistent-keepalive but from peer side.
- client
Listen DoublePort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment String
- disabled Boolean
- endpoint
Address String - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port String - An endpoint port can be left blank to allow remote connection from any port.
- interface
Wireguard StringPeer Id - The ID of this resource.
- is
Responder Boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - name String
- Name of the tunnel.
- persistent
Keepalive String - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- String
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- allowed
Addresses string[] - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- interface string
- Name of the interface.
- public
Key string - The remote peer's calculated public key.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint string - The IP address and port number of the WireGuard Server.
- client
Keepalive string - Same as persistent-keepalive but from peer side.
- client
Listen numberPort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment string
- disabled boolean
- endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- interface
Wireguard stringPeer Id - The ID of this resource.
- is
Responder boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - name string
- Name of the tunnel.
- persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- allowed_
addresses Sequence[str] - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- interface str
- Name of the interface.
- public_
key str - The remote peer's calculated public key.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- client_
address str - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client_
dns str - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client_
endpoint str - The IP address and port number of the WireGuard Server.
- client_
keepalive str - Same as persistent-keepalive but from peer side.
- client_
listen_ floatport - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment str
- disabled bool
- endpoint_
address str - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint_
port str - An endpoint port can be left blank to allow remote connection from any port.
- interface_
wireguard_ strpeer_ id - The ID of this resource.
- is_
responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - name str
- Name of the tunnel.
- persistent_
keepalive str - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- str
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private_
key str - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- allowed
Addresses List<String> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- interface String
- Name of the interface.
- public
Key String - The remote peer's calculated public key.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- client
Address String - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns String - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint String - The IP address and port number of the WireGuard Server.
- client
Keepalive String - Same as persistent-keepalive but from peer side.
- client
Listen NumberPort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment String
- disabled Boolean
- endpoint
Address String - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port String - An endpoint port can be left blank to allow remote connection from any port.
- interface
Wireguard StringPeer Id - The ID of this resource.
- is
Responder Boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - name String
- Name of the tunnel.
- persistent
Keepalive String - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- String
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the InterfaceWireguardPeer resource produces the following output properties:
- Current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- Current
Endpoint doublePort - The most recent source IP port of correctly authenticated packets from the peer.
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Handshake string - Time in seconds after the last successful handshake.
- Rx string
- The total amount of bytes received from the peer.
- Tx string
- The total amount of bytes transmitted to the peer.
- Current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- Current
Endpoint float64Port - The most recent source IP port of correctly authenticated packets from the peer.
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Handshake string - Time in seconds after the last successful handshake.
- Rx string
- The total amount of bytes received from the peer.
- Tx string
- The total amount of bytes transmitted to the peer.
- current
Endpoint StringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint DoublePort - The most recent source IP port of correctly authenticated packets from the peer.
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Handshake String - Time in seconds after the last successful handshake.
- rx String
- The total amount of bytes received from the peer.
- tx String
- The total amount of bytes transmitted to the peer.
- current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint numberPort - The most recent source IP port of correctly authenticated packets from the peer.
- dynamic boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Handshake string - Time in seconds after the last successful handshake.
- rx string
- The total amount of bytes received from the peer.
- tx string
- The total amount of bytes transmitted to the peer.
- current_
endpoint_ straddress - The most recent source IP address of correctly authenticated packets from the peer.
- current_
endpoint_ floatport - The most recent source IP port of correctly authenticated packets from the peer.
- dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
handshake str - Time in seconds after the last successful handshake.
- rx str
- The total amount of bytes received from the peer.
- tx str
- The total amount of bytes transmitted to the peer.
- current
Endpoint StringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint NumberPort - The most recent source IP port of correctly authenticated packets from the peer.
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Handshake String - Time in seconds after the last successful handshake.
- rx String
- The total amount of bytes received from the peer.
- tx String
- The total amount of bytes transmitted to the peer.
Look up Existing InterfaceWireguardPeer Resource
Get an existing InterfaceWireguardPeer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InterfaceWireguardPeerState, opts?: CustomResourceOptions): InterfaceWireguardPeer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
allowed_addresses: Optional[Sequence[str]] = None,
client_address: Optional[str] = None,
client_dns: Optional[str] = None,
client_endpoint: Optional[str] = None,
client_keepalive: Optional[str] = None,
client_listen_port: Optional[float] = None,
comment: Optional[str] = None,
current_endpoint_address: Optional[str] = None,
current_endpoint_port: Optional[float] = None,
disabled: Optional[bool] = None,
dynamic: Optional[bool] = None,
endpoint_address: Optional[str] = None,
endpoint_port: Optional[str] = None,
interface: Optional[str] = None,
interface_wireguard_peer_id: Optional[str] = None,
is_responder: Optional[bool] = None,
last_handshake: Optional[str] = None,
name: Optional[str] = None,
persistent_keepalive: Optional[str] = None,
preshared_key: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None,
rx: Optional[str] = None,
tx: Optional[str] = None) -> InterfaceWireguardPeer
func GetInterfaceWireguardPeer(ctx *Context, name string, id IDInput, state *InterfaceWireguardPeerState, opts ...ResourceOption) (*InterfaceWireguardPeer, error)
public static InterfaceWireguardPeer Get(string name, Input<string> id, InterfaceWireguardPeerState? state, CustomResourceOptions? opts = null)
public static InterfaceWireguardPeer get(String name, Output<String> id, InterfaceWireguardPeerState state, CustomResourceOptions options)
resources: _: type: routeros:InterfaceWireguardPeer get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allowed
Addresses List<string> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- Client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- Client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- Client
Endpoint string - The IP address and port number of the WireGuard Server.
- Client
Keepalive string - Same as persistent-keepalive but from peer side.
- Client
Listen doublePort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- Comment string
- Current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- Current
Endpoint doublePort - The most recent source IP port of correctly authenticated packets from the peer.
- Disabled bool
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- Endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- Interface string
- Name of the interface.
- Interface
Wireguard stringPeer Id - The ID of this resource.
- Is
Responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - Last
Handshake string - Time in seconds after the last successful handshake.
- Name string
- Name of the tunnel.
- Persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- Public
Key string - The remote peer's calculated public key.
- Rx string
- The total amount of bytes received from the peer.
- Tx string
- The total amount of bytes transmitted to the peer.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Allowed
Addresses []string - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- Client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- Client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- Client
Endpoint string - The IP address and port number of the WireGuard Server.
- Client
Keepalive string - Same as persistent-keepalive but from peer side.
- Client
Listen float64Port - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- Comment string
- Current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- Current
Endpoint float64Port - The most recent source IP port of correctly authenticated packets from the peer.
- Disabled bool
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- Endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- Interface string
- Name of the interface.
- Interface
Wireguard stringPeer Id - The ID of this resource.
- Is
Responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - Last
Handshake string - Time in seconds after the last successful handshake.
- Name string
- Name of the tunnel.
- Persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- Public
Key string - The remote peer's calculated public key.
- Rx string
- The total amount of bytes received from the peer.
- Tx string
- The total amount of bytes transmitted to the peer.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- allowed
Addresses List<String> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- client
Address String - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns String - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint String - The IP address and port number of the WireGuard Server.
- client
Keepalive String - Same as persistent-keepalive but from peer side.
- client
Listen DoublePort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment String
- current
Endpoint StringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint DoublePort - The most recent source IP port of correctly authenticated packets from the peer.
- disabled Boolean
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- endpoint
Address String - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port String - An endpoint port can be left blank to allow remote connection from any port.
- interface
Wireguard StringPeer Id - The ID of this resource.
- interface_ String
- Name of the interface.
- is
Responder Boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - last
Handshake String - Time in seconds after the last successful handshake.
- name String
- Name of the tunnel.
- persistent
Keepalive String - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- String
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key String - The remote peer's calculated public key.
- rx String
- The total amount of bytes received from the peer.
- tx String
- The total amount of bytes transmitted to the peer.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- allowed
Addresses string[] - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- client
Address string - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns string - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint string - The IP address and port number of the WireGuard Server.
- client
Keepalive string - Same as persistent-keepalive but from peer side.
- client
Listen numberPort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment string
- current
Endpoint stringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint numberPort - The most recent source IP port of correctly authenticated packets from the peer.
- disabled boolean
- dynamic boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- endpoint
Address string - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port string - An endpoint port can be left blank to allow remote connection from any port.
- interface string
- Name of the interface.
- interface
Wireguard stringPeer Id - The ID of this resource.
- is
Responder boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - last
Handshake string - Time in seconds after the last successful handshake.
- name string
- Name of the tunnel.
- persistent
Keepalive string - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- string
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key string - The remote peer's calculated public key.
- rx string
- The total amount of bytes received from the peer.
- tx string
- The total amount of bytes transmitted to the peer.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- allowed_
addresses Sequence[str] - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- client_
address str - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client_
dns str - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client_
endpoint str - The IP address and port number of the WireGuard Server.
- client_
keepalive str - Same as persistent-keepalive but from peer side.
- client_
listen_ floatport - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment str
- current_
endpoint_ straddress - The most recent source IP address of correctly authenticated packets from the peer.
- current_
endpoint_ floatport - The most recent source IP port of correctly authenticated packets from the peer.
- disabled bool
- dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- endpoint_
address str - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint_
port str - An endpoint port can be left blank to allow remote connection from any port.
- interface str
- Name of the interface.
- interface_
wireguard_ strpeer_ id - The ID of this resource.
- is_
responder bool - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - last_
handshake str - Time in seconds after the last successful handshake.
- name str
- Name of the tunnel.
- persistent_
keepalive str - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- str
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private_
key str - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public_
key str - The remote peer's calculated public key.
- rx str
- The total amount of bytes received from the peer.
- tx str
- The total amount of bytes transmitted to the peer.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- allowed
Addresses List<String> - List of IP (v4 or v6) addresses with CIDR masks from which incoming traffic for this peer is allowed and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
- client
Address String - When imported using a qr code for a client (for example, a phone), then this address for the wg interface is set on that device.
- client
Dns String - Specify when using WireGuard Server as a VPN gateway for peer traffic.
- client
Endpoint String - The IP address and port number of the WireGuard Server.
- client
Keepalive String - Same as persistent-keepalive but from peer side.
- client
Listen NumberPort - The local port upon which this WireGuard tunnel will listen for incoming traffic from peers, and the port from which it will source outgoing packets.
- comment String
- current
Endpoint StringAddress - The most recent source IP address of correctly authenticated packets from the peer.
- current
Endpoint NumberPort - The most recent source IP port of correctly authenticated packets from the peer.
- disabled Boolean
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- endpoint
Address String - An endpoint IP or hostname can be left blank to allow remote connection from any address.
- endpoint
Port String - An endpoint port can be left blank to allow remote connection from any port.
- interface String
- Name of the interface.
- interface
Wireguard StringPeer Id - The ID of this resource.
- is
Responder Boolean - Specifies if peer is intended to be connection initiator or only responder. Should be used on WireGuard devices that are used as
servers
for other devices as clients to connect to. Otherwise router will all repeatedly try to connectendpoint-address
orcurrent-endpoint-address
causing unnecessary system logs to be written. - last
Handshake String - Time in seconds after the last successful handshake.
- name String
- Name of the tunnel.
- persistent
Keepalive String - A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from a peer, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds.
- String
- A base64 preshared key. Optional, and may be omitted. This option adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance.
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key String - The remote peer's calculated public key.
- rx String
- The total amount of bytes received from the peer.
- tx String
- The total amount of bytes transmitted to the peer.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/wireguard/peers get [print show-ids]]
$ pulumi import routeros:index/interfaceWireguardPeer:InterfaceWireguardPeer wg_peer "*0"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- routeros terraform-routeros/terraform-provider-routeros
- License
- Notes
- This Pulumi package is based on the
routeros
Terraform Provider.