1. Packages
  2. Twingate
  3. API Docs
  4. TwingateConnector
Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate

twingate.TwingateConnector

Explore with Pulumi AI

twingate logo
Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate

    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,
    });
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      awsNetwork:
        type: twingate:TwingateRemoteNetwork
      awsConnector:
        type: twingate:TwingateConnector
        properties:
          remoteNetworkId: ${awsNetwork.id}
          statusUpdatesEnabled: true
    

    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 string
    The unique name of the resource.
    args TwingateConnectorArgs
    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 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 string
    The unique name of the resource.
    args TwingateConnectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TwingateConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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,
    });
    
    example, err := twingate.NewTwingateConnector(ctx, "twingateConnectorResource", &twingate.TwingateConnectorArgs{
    	RemoteNetworkId:      pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	StatusUpdatesEnabled: pulumi.Bool(false),
    })
    
    var twingateConnectorResource = new TwingateConnector("twingateConnectorResource", TwingateConnectorArgs.builder()
        .remoteNetworkId("string")
        .name("string")
        .statusUpdatesEnabled(false)
        .build());
    
    twingate_connector_resource = twingate.TwingateConnector("twingateConnectorResource",
        remote_network_id="string",
        name="string",
        status_updates_enabled=False)
    
    const twingateConnectorResource = new twingate.TwingateConnector("twingateConnectorResource", {
        remoteNetworkId: "string",
        name: "string",
        statusUpdatesEnabled: false,
    });
    
    type: twingate:TwingateConnector
    properties:
        name: string
        remoteNetworkId: string
        statusUpdatesEnabled: false
    

    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

    The TwingateConnector resource accepts the following input properties:

    RemoteNetworkId 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 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 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 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 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 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    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,
            name: Optional[str] = None,
            remote_network_id: Optional[str] = None,
            status_updates_enabled: Optional[bool] = 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Name string
    Name of the Connector, if not provided one will be generated.
    RemoteNetworkId string
    The ID of the Remote Network the Connector is attached to.
    StatusUpdatesEnabled bool
    Determines whether status notifications are enabled for the Connector. Default is true.
    Name string
    Name of the Connector, if not provided one will be generated.
    RemoteNetworkId string
    The ID of the Remote Network the Connector is attached to.
    StatusUpdatesEnabled bool
    Determines whether status notifications are enabled for the Connector. Default is true.
    name String
    Name of the Connector, if not provided one will be generated.
    remoteNetworkId String
    The ID of the Remote Network the Connector is attached to.
    statusUpdatesEnabled Boolean
    Determines whether status notifications are enabled for the Connector. Default is true.
    name string
    Name of the Connector, if not provided one will be generated.
    remoteNetworkId string
    The ID of the Remote Network the Connector is attached to.
    statusUpdatesEnabled boolean
    Determines whether status notifications are enabled for the Connector. Default is true.
    name str
    Name of the Connector, if not provided one will be generated.
    remote_network_id str
    The ID of the Remote Network the Connector is attached to.
    status_updates_enabled bool
    Determines whether status notifications are enabled for the Connector. Default is true.
    name String
    Name of the Connector, if not provided one will be generated.
    remoteNetworkId String
    The ID of the Remote Network the Connector is attached to.
    statusUpdatesEnabled Boolean
    Determines whether status notifications are enabled for the Connector. Default is true.

    Import

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

    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.
    twingate logo
    Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate