routeros.InterfaceWireguard
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});
import pulumi
import pulumi_routeros as routeros
test_wg_interface = routeros.InterfaceWireguard("testWgInterface", listen_port=13231)
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 {
_, err := routeros.NewInterfaceWireguard(ctx, "testWgInterface", &routeros.InterfaceWireguardArgs{
ListenPort: pulumi.Float64(13231),
})
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,
});
});
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 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());
}
}
resources:
testWgInterface:
type: routeros:InterfaceWireguard
properties:
listenPort: '13231'
Create InterfaceWireguard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InterfaceWireguard(name: string, args: InterfaceWireguardArgs, opts?: CustomResourceOptions);
@overload
def InterfaceWireguard(resource_name: str,
args: InterfaceWireguardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InterfaceWireguard(resource_name: str,
opts: Optional[ResourceOptions] = None,
listen_port: Optional[float] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
interface_wireguard_id: Optional[str] = None,
mtu: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None)
func NewInterfaceWireguard(ctx *Context, name string, args InterfaceWireguardArgs, opts ...ResourceOption) (*InterfaceWireguard, error)
public InterfaceWireguard(string name, InterfaceWireguardArgs args, CustomResourceOptions? opts = null)
public InterfaceWireguard(String name, InterfaceWireguardArgs args)
public InterfaceWireguard(String name, InterfaceWireguardArgs args, CustomResourceOptions options)
type: routeros:InterfaceWireguard
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 InterfaceWireguardArgs
- 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 InterfaceWireguardArgs
- 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 InterfaceWireguardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InterfaceWireguardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InterfaceWireguardArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
InterfaceWireguard 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 InterfaceWireguard resource accepts the following input properties:
- Listen
Port double - Port for WireGuard service to listen on for incoming sessions.
- Comment string
- Disabled bool
- Interface
Wireguard stringId - The ID of this resource.
- Mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- Name string
- 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.
- Listen
Port float64 - Port for WireGuard service to listen on for incoming sessions.
- Comment string
- Disabled bool
- Interface
Wireguard stringId - The ID of this resource.
- Mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- Name string
- 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.
- listen
Port Double - Port for WireGuard service to listen on for incoming sessions.
- ___
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.
- comment String
- disabled Boolean
- interface
Wireguard StringId - The ID of this resource.
- mtu String
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name String
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- listen
Port number - Port for WireGuard service to listen on for incoming sessions.
- ___
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.
- comment string
- disabled boolean
- interface
Wireguard stringId - The ID of this resource.
- mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name string
- private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- listen_
port float - Port for WireGuard service to listen on for incoming sessions.
- ___
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.
- comment str
- disabled bool
- interface_
wireguard_ strid - The ID of this resource.
- mtu str
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name str
- private_
key str - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- listen
Port Number - Port for WireGuard service to listen on for incoming sessions.
- ___
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.
- comment String
- disabled Boolean
- interface
Wireguard StringId - The ID of this resource.
- mtu String
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name String
- 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 InterfaceWireguard resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- public_
key str - A base64 public key is calculated from the private key.
- running bool
Look up Existing InterfaceWireguard Resource
Get an existing InterfaceWireguard 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?: InterfaceWireguardState, opts?: CustomResourceOptions): InterfaceWireguard
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
interface_wireguard_id: Optional[str] = None,
listen_port: Optional[float] = None,
mtu: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None,
running: Optional[bool] = None) -> InterfaceWireguard
func GetInterfaceWireguard(ctx *Context, name string, id IDInput, state *InterfaceWireguardState, opts ...ResourceOption) (*InterfaceWireguard, error)
public static InterfaceWireguard Get(string name, Input<string> id, InterfaceWireguardState? state, CustomResourceOptions? opts = null)
public static InterfaceWireguard get(String name, Output<String> id, InterfaceWireguardState state, CustomResourceOptions options)
resources: _: type: routeros:InterfaceWireguard 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.
- Comment string
- Disabled bool
- Interface
Wireguard stringId - The ID of this resource.
- Listen
Port double - Port for WireGuard service to listen on for incoming sessions.
- Mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- Name string
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- Public
Key string - A base64 public key is calculated from the private key.
- Running bool
- ___
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.
- Comment string
- Disabled bool
- Interface
Wireguard stringId - The ID of this resource.
- Listen
Port float64 - Port for WireGuard service to listen on for incoming sessions.
- Mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- Name string
- Private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- Public
Key string - A base64 public key is calculated from the private key.
- Running bool
- ___
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.
- comment String
- disabled Boolean
- interface
Wireguard StringId - The ID of this resource.
- listen
Port Double - Port for WireGuard service to listen on for incoming sessions.
- mtu String
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name String
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key String - A base64 public key is calculated from the private key.
- running Boolean
- ___
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.
- comment string
- disabled boolean
- interface
Wireguard stringId - The ID of this resource.
- listen
Port number - Port for WireGuard service to listen on for incoming sessions.
- mtu string
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name string
- private
Key string - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key string - A base64 public key is calculated from the private key.
- running boolean
- ___
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.
- comment str
- disabled bool
- interface_
wireguard_ strid - The ID of this resource.
- listen_
port float - Port for WireGuard service to listen on for incoming sessions.
- mtu str
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name str
- private_
key str - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public_
key str - A base64 public key is calculated from the private key.
- running bool
- ___
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.
- comment String
- disabled Boolean
- interface
Wireguard StringId - The ID of this resource.
- listen
Port Number - Port for WireGuard service to listen on for incoming sessions.
- mtu String
- Layer3 Maximum transmission unit ('auto', 0 .. 65535)
- name String
- private
Key String - A base64 private key. If not specified, it will be automatically generated upon interface creation.
- public
Key String - A base64 public key is calculated from the private key.
- running Boolean
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/wireguard get [print show-ids]]
$ pulumi import routeros:index/interfaceWireguard:InterfaceWireguard test_wg_interface "*1"
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.