@lbrlabs/pulumi-tailscalebastion
Version:
This repo provides a [multi-language](https://www.pulumi.com/blog/pulumiup-pulumi-packages-multi-language-components/) component that creates a [Tailscale](https://tailscale.com/) [Subnet Router](https://tailscale.com/kb/1019/subnets/) in your chosen clou
74 lines • 4.05 kB
JavaScript
;
// *** WARNING: this file was generated by Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bastion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
class Bastion extends pulumi.ComponentResource {
/**
* Create a Bastion 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, args, opts) {
var _a, _b, _c, _d, _e, _f;
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.highAvailability === undefined) && !opts.urn) {
throw new Error("Missing required property 'highAvailability'");
}
if ((!args || args.region === undefined) && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if ((!args || args.subnetIds === undefined) && !opts.urn) {
throw new Error("Missing required property 'subnetIds'");
}
if ((!args || args.tailscaleTags === undefined) && !opts.urn) {
throw new Error("Missing required property 'tailscaleTags'");
}
if ((!args || args.vpcId === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["architecture"] = (_a = (args ? args.architecture : undefined)) !== null && _a !== void 0 ? _a : "x86_64";
resourceInputs["enableAppConnector"] = (_b = (args ? args.enableAppConnector : undefined)) !== null && _b !== void 0 ? _b : false;
resourceInputs["enableExitNode"] = (_c = (args ? args.enableExitNode : undefined)) !== null && _c !== void 0 ? _c : false;
resourceInputs["enableSSH"] = (_d = (args ? args.enableSSH : undefined)) !== null && _d !== void 0 ? _d : true;
resourceInputs["highAvailability"] = (_e = (args ? args.highAvailability : undefined)) !== null && _e !== void 0 ? _e : false;
resourceInputs["hostname"] = args ? args.hostname : undefined;
resourceInputs["instanceType"] = args ? args.instanceType : undefined;
resourceInputs["oauthClientSecret"] = args ? args.oauthClientSecret : undefined;
resourceInputs["public"] = (_f = (args ? args.public : undefined)) !== null && _f !== void 0 ? _f : false;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["routes"] = args ? args.routes : undefined;
resourceInputs["subnetIds"] = args ? args.subnetIds : undefined;
resourceInputs["tailscaleTags"] = args ? args.tailscaleTags : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["asgName"] = undefined /*out*/;
resourceInputs["privateKey"] = undefined /*out*/;
}
else {
resourceInputs["asgName"] = undefined /*out*/;
resourceInputs["privateKey"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Bastion.__pulumiType, name, resourceInputs, opts, true /*remote*/);
}
/**
* Returns true if the given object is an instance of Bastion. 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'] === Bastion.__pulumiType;
}
}
exports.Bastion = Bastion;
/** @internal */
Bastion.__pulumiType = 'tailscale-bastion:aws:Bastion';
//# sourceMappingURL=bastion.js.map