@twingate/pulumi-twingate
Version:
A Pulumi package for creating and managing Twingate cloud resources.
64 lines • 2.88 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.TwingateGatewayConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Generates a Gateway configuration YAML from SSH and Kubernetes resources.
*/
class TwingateGatewayConfig extends pulumi.CustomResource {
/**
* Get an existing TwingateGatewayConfig 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, id, state, opts) {
return new TwingateGatewayConfig(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TwingateGatewayConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === TwingateGatewayConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["content"] = state?.content;
resourceInputs["kubernetes"] = state?.kubernetes;
resourceInputs["metricsPort"] = state?.metricsPort;
resourceInputs["port"] = state?.port;
resourceInputs["ssh"] = state?.ssh;
resourceInputs["tls"] = state?.tls;
}
else {
const args = argsOrState;
resourceInputs["kubernetes"] = args?.kubernetes;
resourceInputs["metricsPort"] = args?.metricsPort;
resourceInputs["port"] = args?.port;
resourceInputs["ssh"] = args?.ssh;
resourceInputs["tls"] = args?.tls;
resourceInputs["content"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["content"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(TwingateGatewayConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.TwingateGatewayConfig = TwingateGatewayConfig;
/** @internal */
TwingateGatewayConfig.__pulumiType = 'twingate:index/twingateGatewayConfig:TwingateGatewayConfig';
//# sourceMappingURL=twingateGatewayConfig.js.map