1. Packages
  2. Twingate
  3. API Docs
  4. TwingateConnector
Twingate v3.0.17 published on Wednesday, Apr 9, 2025 by Twingate

twingate.TwingateConnector

Explore with Pulumi AI

Connectors provide connectivity to Remote Networks. This resource type will create the Connector in the Twingate Admin Console, but in order to successfully deploy it, you must also generate Connector tokens that authenticate the Connector with Twingate. For more information, see Twingate’s documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as twingate from "@twingate/pulumi-twingate";

const awsNetwork = new twingate.TwingateRemoteNetwork("awsNetwork", {});
const awsConnector = new twingate.TwingateConnector("awsConnector", {
    remoteNetworkId: awsNetwork.id,
    statusUpdatesEnabled: true,
});
Copy
import pulumi
import pulumi_twingate as twingate

aws_network = twingate.TwingateRemoteNetwork("awsNetwork")
aws_connector = twingate.TwingateConnector("awsConnector",
    remote_network_id=aws_network.id,
    status_updates_enabled=True)
Copy
package main

import (
	"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		awsNetwork, err := twingate.NewTwingateRemoteNetwork(ctx, "awsNetwork", nil)
		if err != nil {
			return err
		}
		_, err = twingate.NewTwingateConnector(ctx, "awsConnector", &twingate.TwingateConnectorArgs{
			RemoteNetworkId:      awsNetwork.ID(),
			StatusUpdatesEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Twingate = Twingate.Twingate;

return await Deployment.RunAsync(() => 
{
    var awsNetwork = new Twingate.TwingateRemoteNetwork("awsNetwork");

    var awsConnector = new Twingate.TwingateConnector("awsConnector", new()
    {
        RemoteNetworkId = awsNetwork.Id,
        StatusUpdatesEnabled = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.twingate.TwingateRemoteNetwork;
import com.pulumi.twingate.TwingateConnector;
import com.pulumi.twingate.TwingateConnectorArgs;
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 awsNetwork = new TwingateRemoteNetwork("awsNetwork");

        var awsConnector = new TwingateConnector("awsConnector", TwingateConnectorArgs.builder()
            .remoteNetworkId(awsNetwork.id())
            .statusUpdatesEnabled(true)
            .build());

    }
}
Copy
resources:
  awsNetwork:
    type: twingate:TwingateRemoteNetwork
  awsConnector:
    type: twingate:TwingateConnector
    properties:
      remoteNetworkId: ${awsNetwork.id}
      statusUpdatesEnabled: true
Copy

Create TwingateConnector Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TwingateConnector(name: string, args: TwingateConnectorArgs, opts?: CustomResourceOptions);
@overload
def TwingateConnector(resource_name: str,
                      args: TwingateConnectorArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def TwingateConnector(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      remote_network_id: Optional[str] = None,
                      name: Optional[str] = None,
                      status_updates_enabled: Optional[bool] = None)
func NewTwingateConnector(ctx *Context, name string, args TwingateConnectorArgs, opts ...ResourceOption) (*TwingateConnector, error)
public TwingateConnector(string name, TwingateConnectorArgs args, CustomResourceOptions? opts = null)
public TwingateConnector(String name, TwingateConnectorArgs args)
public TwingateConnector(String name, TwingateConnectorArgs args, CustomResourceOptions options)
type: twingate:TwingateConnector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TwingateConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TwingateConnectorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TwingateConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TwingateConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TwingateConnectorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var twingateConnectorResource = new Twingate.TwingateConnector("twingateConnectorResource", new()
{
    RemoteNetworkId = "string",
    Name = "string",
    StatusUpdatesEnabled = false,
});
Copy
example, err := twingate.NewTwingateConnector(ctx, "twingateConnectorResource", &twingate.TwingateConnectorArgs{
	RemoteNetworkId:      pulumi.String("string"),
	Name:                 pulumi.String("string"),
	StatusUpdatesEnabled: pulumi.Bool(false),
})
Copy
var twingateConnectorResource = new TwingateConnector("twingateConnectorResource", TwingateConnectorArgs.builder()
    .remoteNetworkId("string")
    .name("string")
    .statusUpdatesEnabled(false)
    .build());
Copy
twingate_connector_resource = twingate.TwingateConnector("twingateConnectorResource",
    remote_network_id="string",
    name="string",
    status_updates_enabled=False)
Copy
const twingateConnectorResource = new twingate.TwingateConnector("twingateConnectorResource", {
    remoteNetworkId: "string",
    name: "string",
    statusUpdatesEnabled: false,
});
Copy
type: twingate:TwingateConnector
properties:
    name: string
    remoteNetworkId: string
    statusUpdatesEnabled: false
Copy

TwingateConnector 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 TwingateConnector resource accepts the following input properties:

RemoteNetworkId This property is required. string
The ID of the Remote Network the Connector is attached to.
Name string
Name of the Connector, if not provided one will be generated.
StatusUpdatesEnabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
RemoteNetworkId This property is required. string
The ID of the Remote Network the Connector is attached to.
Name string
Name of the Connector, if not provided one will be generated.
StatusUpdatesEnabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
remoteNetworkId This property is required. String
The ID of the Remote Network the Connector is attached to.
name String
Name of the Connector, if not provided one will be generated.
statusUpdatesEnabled Boolean
Determines whether status notifications are enabled for the Connector. Default is true.
remoteNetworkId This property is required. string
The ID of the Remote Network the Connector is attached to.
name string
Name of the Connector, if not provided one will be generated.
statusUpdatesEnabled boolean
Determines whether status notifications are enabled for the Connector. Default is true.
remote_network_id This property is required. str
The ID of the Remote Network the Connector is attached to.
name str
Name of the Connector, if not provided one will be generated.
status_updates_enabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
remoteNetworkId This property is required. String
The ID of the Remote Network the Connector is attached to.
name String
Name of the Connector, if not provided one will be generated.
statusUpdatesEnabled Boolean
Determines whether status notifications are enabled for the Connector. Default is true.

Outputs

All input properties are implicitly available as output properties. Additionally, the TwingateConnector resource produces the following output properties:

Hostname string
The hostname of the machine hosting the Connector.
Id string
The provider-assigned unique ID for this managed resource.
PrivateIps List<string>
The Connector's private IP addresses.
PublicIp string
The Connector's public IP address.
State string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
Version string
The Connector's version.
Hostname string
The hostname of the machine hosting the Connector.
Id string
The provider-assigned unique ID for this managed resource.
PrivateIps []string
The Connector's private IP addresses.
PublicIp string
The Connector's public IP address.
State string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
Version string
The Connector's version.
hostname String
The hostname of the machine hosting the Connector.
id String
The provider-assigned unique ID for this managed resource.
privateIps List<String>
The Connector's private IP addresses.
publicIp String
The Connector's public IP address.
state String
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
version String
The Connector's version.
hostname string
The hostname of the machine hosting the Connector.
id string
The provider-assigned unique ID for this managed resource.
privateIps string[]
The Connector's private IP addresses.
publicIp string
The Connector's public IP address.
state string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
version string
The Connector's version.
hostname str
The hostname of the machine hosting the Connector.
id str
The provider-assigned unique ID for this managed resource.
private_ips Sequence[str]
The Connector's private IP addresses.
public_ip str
The Connector's public IP address.
state str
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
version str
The Connector's version.
hostname String
The hostname of the machine hosting the Connector.
id String
The provider-assigned unique ID for this managed resource.
privateIps List<String>
The Connector's private IP addresses.
publicIp String
The Connector's public IP address.
state String
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
version String
The Connector's version.

Look up Existing TwingateConnector Resource

Get an existing TwingateConnector 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?: TwingateConnectorState, opts?: CustomResourceOptions): TwingateConnector
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        hostname: Optional[str] = None,
        name: Optional[str] = None,
        private_ips: Optional[Sequence[str]] = None,
        public_ip: Optional[str] = None,
        remote_network_id: Optional[str] = None,
        state: Optional[str] = None,
        status_updates_enabled: Optional[bool] = None,
        version: Optional[str] = None) -> TwingateConnector
func GetTwingateConnector(ctx *Context, name string, id IDInput, state *TwingateConnectorState, opts ...ResourceOption) (*TwingateConnector, error)
public static TwingateConnector Get(string name, Input<string> id, TwingateConnectorState? state, CustomResourceOptions? opts = null)
public static TwingateConnector get(String name, Output<String> id, TwingateConnectorState state, CustomResourceOptions options)
resources:  _:    type: twingate:TwingateConnector    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Hostname string
The hostname of the machine hosting the Connector.
Name string
Name of the Connector, if not provided one will be generated.
PrivateIps List<string>
The Connector's private IP addresses.
PublicIp string
The Connector's public IP address.
RemoteNetworkId string
The ID of the Remote Network the Connector is attached to.
State string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
StatusUpdatesEnabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
Version string
The Connector's version.
Hostname string
The hostname of the machine hosting the Connector.
Name string
Name of the Connector, if not provided one will be generated.
PrivateIps []string
The Connector's private IP addresses.
PublicIp string
The Connector's public IP address.
RemoteNetworkId string
The ID of the Remote Network the Connector is attached to.
State string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
StatusUpdatesEnabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
Version string
The Connector's version.
hostname String
The hostname of the machine hosting the Connector.
name String
Name of the Connector, if not provided one will be generated.
privateIps List<String>
The Connector's private IP addresses.
publicIp String
The Connector's public IP address.
remoteNetworkId String
The ID of the Remote Network the Connector is attached to.
state String
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
statusUpdatesEnabled Boolean
Determines whether status notifications are enabled for the Connector. Default is true.
version String
The Connector's version.
hostname string
The hostname of the machine hosting the Connector.
name string
Name of the Connector, if not provided one will be generated.
privateIps string[]
The Connector's private IP addresses.
publicIp string
The Connector's public IP address.
remoteNetworkId string
The ID of the Remote Network the Connector is attached to.
state string
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
statusUpdatesEnabled boolean
Determines whether status notifications are enabled for the Connector. Default is true.
version string
The Connector's version.
hostname str
The hostname of the machine hosting the Connector.
name str
Name of the Connector, if not provided one will be generated.
private_ips Sequence[str]
The Connector's private IP addresses.
public_ip str
The Connector's public IP address.
remote_network_id str
The ID of the Remote Network the Connector is attached to.
state str
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
status_updates_enabled bool
Determines whether status notifications are enabled for the Connector. Default is true.
version str
The Connector's version.
hostname String
The hostname of the machine hosting the Connector.
name String
Name of the Connector, if not provided one will be generated.
privateIps List<String>
The Connector's private IP addresses.
publicIp String
The Connector's public IP address.
remoteNetworkId String
The ID of the Remote Network the Connector is attached to.
state String
The Connector's state. One of ALIVE, DEAD_NO_HEARTBEAT, DEAD_HEARTBEAT_TOO_OLD or DEAD_NO_RELAYS.
statusUpdatesEnabled Boolean
Determines whether status notifications are enabled for the Connector. Default is true.
version String
The Connector's version.

Import

$ pulumi import twingate:index/twingateConnector:TwingateConnector aws_connector Q29ubmVjdG9yOjI2NzM=
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
twingate Twingate/pulumi-twingate
License
Apache-2.0
Notes
This Pulumi package is based on the twingate Terraform Provider.