routeros.Zerotier
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
import * as zerotier from "@pulumi/zerotier";
const identity = new zerotier.index.Zerotier_identity("identity", {});
const zt1 = new routeros.Zerotier("zt1", {
comment: "ZeroTier Central",
identity: identity.privateKey,
interfaces: ["all"],
});
import pulumi
import pulumi_routeros as routeros
import pulumi_zerotier as zerotier
identity = zerotier.index.Zerotier_identity("identity")
zt1 = routeros.Zerotier("zt1",
comment="ZeroTier Central",
identity=identity["privateKey"],
interfaces=["all"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi-zerotier/sdk/go/zerotier"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
identity, err := zerotier.NewZerotier_identity(ctx, "identity", nil)
if err != nil {
return err
}
_, err = routeros.NewZerotier(ctx, "zt1", &routeros.ZerotierArgs{
Comment: pulumi.String("ZeroTier Central"),
Identity: identity.PrivateKey,
Interfaces: pulumi.StringArray{
pulumi.String("all"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
using Zerotier = Pulumi.Zerotier;
return await Deployment.RunAsync(() =>
{
var identity = new Zerotier.Index.Zerotier_identity("identity");
var zt1 = new Routeros.Zerotier("zt1", new()
{
Comment = "ZeroTier Central",
Identity = identity.PrivateKey,
Interfaces = new[]
{
"all",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zerotier.zerotier_identity;
import com.pulumi.routeros.Zerotier;
import com.pulumi.routeros.ZerotierArgs;
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 identity = new Zerotier_identity("identity");
var zt1 = new Zerotier("zt1", ZerotierArgs.builder()
.comment("ZeroTier Central")
.identity(identity.privateKey())
.interfaces("all")
.build());
}
}
resources:
identity:
type: zerotier:zerotier_identity
zt1:
type: routeros:Zerotier
properties:
comment: ZeroTier Central
identity: ${identity.privateKey}
interfaces:
- all
Create Zerotier Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Zerotier(name: string, args?: ZerotierArgs, opts?: CustomResourceOptions);
@overload
def Zerotier(resource_name: str,
args: Optional[ZerotierArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Zerotier(resource_name: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
___ts_: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
identity: Optional[str] = None,
interfaces: Optional[Sequence[str]] = None,
name: Optional[str] = None,
port: Optional[float] = None,
route_distance: Optional[float] = None,
zerotier_id: Optional[str] = None)
func NewZerotier(ctx *Context, name string, args *ZerotierArgs, opts ...ResourceOption) (*Zerotier, error)
public Zerotier(string name, ZerotierArgs? args = null, CustomResourceOptions? opts = null)
public Zerotier(String name, ZerotierArgs args)
public Zerotier(String name, ZerotierArgs args, CustomResourceOptions options)
type: routeros:Zerotier
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 ZerotierArgs
- 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 ZerotierArgs
- 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 ZerotierArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZerotierArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZerotierArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Zerotier 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 Zerotier resource accepts the following input properties:
- Comment string
- Disabled bool
- Identity string
- The 40-bit unique instance address.
- Interfaces List<string>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- Name string
- Name of the ZeroTier instance.
- Port double
- The port number the instance listens to.
- Route
Distance double - The route distance for routes obtained from the planet/moon server.
- Zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- Comment string
- Disabled bool
- Identity string
- The 40-bit unique instance address.
- Interfaces []string
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- Name string
- Name of the ZeroTier instance.
- Port float64
- The port number the instance listens to.
- Route
Distance float64 - The route distance for routes obtained from the planet/moon server.
- Zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. 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.
- ___
ts_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment String
- disabled Boolean
- identity String
- The 40-bit unique instance address.
- interfaces List<String>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name String
- Name of the ZeroTier instance.
- port Double
- The port number the instance listens to.
- route
Distance Double - The route distance for routes obtained from the planet/moon server.
- zerotier
Id String - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment string
- disabled boolean
- identity string
- The 40-bit unique instance address.
- interfaces string[]
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name string
- Name of the ZeroTier instance.
- port number
- The port number the instance listens to.
- route
Distance number - The route distance for routes obtained from the planet/moon server.
- zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ str - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment str
- disabled bool
- identity str
- The 40-bit unique instance address.
- interfaces Sequence[str]
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name str
- Name of the ZeroTier instance.
- port float
- The port number the instance listens to.
- route_
distance float - The route distance for routes obtained from the planet/moon server.
- zerotier_
id str - The ID of this resource.
- ___
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.
- ___
ts_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment String
- disabled Boolean
- identity String
- The 40-bit unique instance address.
- interfaces List<String>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name String
- Name of the ZeroTier instance.
- port Number
- The port number the instance listens to.
- route
Distance Number - The route distance for routes obtained from the planet/moon server.
- zerotier
Id String - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Zerotier resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Identity
Public string - The public identity of the ZeroTier instance.
- Online bool
- A flag whether the ZeroTier instance is currently online.
- State string
- The state of the ZeroTier instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identity
Public string - The public identity of the ZeroTier instance.
- Online bool
- A flag whether the ZeroTier instance is currently online.
- State string
- The state of the ZeroTier instance.
- id String
- The provider-assigned unique ID for this managed resource.
- identity
Public String - The public identity of the ZeroTier instance.
- online Boolean
- A flag whether the ZeroTier instance is currently online.
- state String
- The state of the ZeroTier instance.
- id string
- The provider-assigned unique ID for this managed resource.
- identity
Public string - The public identity of the ZeroTier instance.
- online boolean
- A flag whether the ZeroTier instance is currently online.
- state string
- The state of the ZeroTier instance.
- id str
- The provider-assigned unique ID for this managed resource.
- identity_
public str - The public identity of the ZeroTier instance.
- online bool
- A flag whether the ZeroTier instance is currently online.
- state str
- The state of the ZeroTier instance.
- id String
- The provider-assigned unique ID for this managed resource.
- identity
Public String - The public identity of the ZeroTier instance.
- online Boolean
- A flag whether the ZeroTier instance is currently online.
- state String
- The state of the ZeroTier instance.
Look up Existing Zerotier Resource
Get an existing Zerotier 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?: ZerotierState, opts?: CustomResourceOptions): Zerotier
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
___ts_: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
identity: Optional[str] = None,
identity_public: Optional[str] = None,
interfaces: Optional[Sequence[str]] = None,
name: Optional[str] = None,
online: Optional[bool] = None,
port: Optional[float] = None,
route_distance: Optional[float] = None,
state: Optional[str] = None,
zerotier_id: Optional[str] = None) -> Zerotier
func GetZerotier(ctx *Context, name string, id IDInput, state *ZerotierState, opts ...ResourceOption) (*Zerotier, error)
public static Zerotier Get(string name, Input<string> id, ZerotierState? state, CustomResourceOptions? opts = null)
public static Zerotier get(String name, Output<String> id, ZerotierState state, CustomResourceOptions options)
resources: _: type: routeros:Zerotier 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
- Identity string
- The 40-bit unique instance address.
- Identity
Public string - The public identity of the ZeroTier instance.
- Interfaces List<string>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- Name string
- Name of the ZeroTier instance.
- Online bool
- A flag whether the ZeroTier instance is currently online.
- Port double
- The port number the instance listens to.
- Route
Distance double - The route distance for routes obtained from the planet/moon server.
- State string
- The state of the ZeroTier instance.
- Zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- Comment string
- Disabled bool
- Identity string
- The 40-bit unique instance address.
- Identity
Public string - The public identity of the ZeroTier instance.
- Interfaces []string
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- Name string
- Name of the ZeroTier instance.
- Online bool
- A flag whether the ZeroTier instance is currently online.
- Port float64
- The port number the instance listens to.
- Route
Distance float64 - The route distance for routes obtained from the planet/moon server.
- State string
- The state of the ZeroTier instance.
- Zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. 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.
- ___
ts_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment String
- disabled Boolean
- identity String
- The 40-bit unique instance address.
- identity
Public String - The public identity of the ZeroTier instance.
- interfaces List<String>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name String
- Name of the ZeroTier instance.
- online Boolean
- A flag whether the ZeroTier instance is currently online.
- port Double
- The port number the instance listens to.
- route
Distance Double - The route distance for routes obtained from the planet/moon server.
- state String
- The state of the ZeroTier instance.
- zerotier
Id String - The ID of this resource.
- ___
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.
- ___
ts_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment string
- disabled boolean
- identity string
- The 40-bit unique instance address.
- identity
Public string - The public identity of the ZeroTier instance.
- interfaces string[]
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name string
- Name of the ZeroTier instance.
- online boolean
- A flag whether the ZeroTier instance is currently online.
- port number
- The port number the instance listens to.
- route
Distance number - The route distance for routes obtained from the planet/moon server.
- state string
- The state of the ZeroTier instance.
- zerotier
Id string - The ID of this resource.
- ___
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.
- ___
ts_ str - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment str
- disabled bool
- identity str
- The 40-bit unique instance address.
- identity_
public str - The public identity of the ZeroTier instance.
- interfaces Sequence[str]
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name str
- Name of the ZeroTier instance.
- online bool
- A flag whether the ZeroTier instance is currently online.
- port float
- The port number the instance listens to.
- route_
distance float - The route distance for routes obtained from the planet/moon server.
- state str
- The state of the ZeroTier instance.
- zerotier_
id str - The ID of this resource.
- ___
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.
- ___
ts_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- comment String
- disabled Boolean
- identity String
- The 40-bit unique instance address.
- identity
Public String - The public identity of the ZeroTier instance.
- interfaces List<String>
- The interfaces to discover ZeroTier peers by ARP and IP type connections.
- name String
- Name of the ZeroTier instance.
- online Boolean
- A flag whether the ZeroTier instance is currently online.
- port Number
- The port number the instance listens to.
- route
Distance Number - The route distance for routes obtained from the planet/moon server.
- state String
- The state of the ZeroTier instance.
- zerotier
Id String - The ID of this resource.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/zerotier get [print show-ids]]
$ pulumi import routeros:index/zerotier:Zerotier zt1 '*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.