@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
75 lines • 3.73 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 inputs = require("../types/input");
const utilities = require("../utilities");
class Bastion extends pulumi.ComponentResource {
/**
* 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;
}
/**
* 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) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.highAvailability === undefined && !opts.urn) {
throw new Error("Missing required property 'highAvailability'");
}
if (args?.region === undefined && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if (args?.subnetIds === undefined && !opts.urn) {
throw new Error("Missing required property 'subnetIds'");
}
if (args?.tailscaleTags === undefined && !opts.urn) {
throw new Error("Missing required property 'tailscaleTags'");
}
if (args?.vpcId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["architecture"] = (args?.architecture) ?? "x86_64";
resourceInputs["enableAppConnector"] = (args?.enableAppConnector) ?? false;
resourceInputs["enableExitNode"] = (args?.enableExitNode) ?? false;
resourceInputs["enableSSH"] = (args?.enableSSH) ?? true;
resourceInputs["highAvailability"] = (args?.highAvailability) ?? false;
resourceInputs["hostname"] = args?.hostname;
resourceInputs["instanceType"] = args?.instanceType;
resourceInputs["oauthClientSecret"] = args?.oauthClientSecret;
resourceInputs["peerRelaySettings"] = args ? (args.peerRelaySettings ? pulumi.output(args.peerRelaySettings).apply(inputs.peerRelaySettingsArgsProvideDefaults) : undefined) : undefined;
resourceInputs["public"] = (args?.public) ?? false;
resourceInputs["region"] = args?.region;
resourceInputs["routes"] = args?.routes;
resourceInputs["subnetIds"] = args?.subnetIds;
resourceInputs["tailscaleTags"] = args?.tailscaleTags;
resourceInputs["vpcId"] = args?.vpcId;
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*/);
}
}
exports.Bastion = Bastion;
/** @internal */
Bastion.__pulumiType = 'tailscale-bastion:aws:Bastion';
//# sourceMappingURL=bastion.js.map