UNPKG

@twingate/pulumi-twingate

Version:

A Pulumi package for creating and managing Twingate cloud resources.

125 lines (124 loc) 4.3 kB
import * as pulumi from "@pulumi/pulumi"; /** * Gateways are the Twingate components that route traffic to remote networks. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as std from "@pulumi/std"; * import * as twingate from "@twingate/pulumi-twingate"; * * const gcp = new twingate.TwingateRemoteNetwork("gcp", {name: "GCP Network"}); * const tls = new twingate.TwingateX509CertificateAuthority("tls", { * name: "My TLS CA", * certificate: std.file({ * input: "ca.pem", * }).then(invoke => invoke.result), * }); * const ssh = new twingate.TwingateSSHCertificateAuthority("ssh", { * name: "My SSH CA", * publicKey: std.file({ * input: "~/.ssh/id_ed25519.pub", * }).then(invoke => std.trimspace({ * input: invoke.result, * })).then(invoke => invoke.result), * }); * // Gateway with both X.509 and SSH CAs * const main = new twingate.TwingateGateway("main", { * remoteNetworkId: gcp.id, * address: "10.0.0.1:8443", * x509CaId: tls.id, * sshCaId: ssh.id, * }); * // Gateway with only X.509 CA (ssh_ca_id is optional) * const minimal = new twingate.TwingateGateway("minimal", { * remoteNetworkId: gcp.id, * address: "10.0.0.2:9001", * x509CaId: tls.id, * }); * ``` */ export declare class TwingateGateway extends pulumi.CustomResource { /** * Get an existing TwingateGateway resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TwingateGatewayState, opts?: pulumi.CustomResourceOptions): TwingateGateway; /** * Returns true if the given object is an instance of TwingateGateway. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TwingateGateway; /** * The address of the Gateway. */ readonly address: pulumi.Output<string>; /** * The ID of the Remote Network the Gateway belongs to. */ readonly remoteNetworkId: pulumi.Output<string>; /** * The ID of the SSH Certificate Authority used for SSH access. */ readonly sshCaId: pulumi.Output<string | undefined>; /** * The ID of the X.509 Certificate Authority used for TLS. */ readonly x509CaId: pulumi.Output<string>; /** * Create a TwingateGateway resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TwingateGatewayArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TwingateGateway resources. */ export interface TwingateGatewayState { /** * The address of the Gateway. */ address?: pulumi.Input<string>; /** * The ID of the Remote Network the Gateway belongs to. */ remoteNetworkId?: pulumi.Input<string>; /** * The ID of the SSH Certificate Authority used for SSH access. */ sshCaId?: pulumi.Input<string>; /** * The ID of the X.509 Certificate Authority used for TLS. */ x509CaId?: pulumi.Input<string>; } /** * The set of arguments for constructing a TwingateGateway resource. */ export interface TwingateGatewayArgs { /** * The address of the Gateway. */ address: pulumi.Input<string>; /** * The ID of the Remote Network the Gateway belongs to. */ remoteNetworkId: pulumi.Input<string>; /** * The ID of the SSH Certificate Authority used for SSH access. */ sshCaId?: pulumi.Input<string>; /** * The ID of the X.509 Certificate Authority used for TLS. */ x509CaId: pulumi.Input<string>; }