@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
101 lines • 4.76 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.TailnetSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The tailnetSettings resource allows you to configure settings for your tailnet. See https://tailscale.com/api#tag/tailnetsettings for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleTailnetSettings = new tailscale.TailnetSettings("sample_tailnet_settings", {
* aclsExternallyManagedOn: true,
* aclsExternalLink: "https://github.com/octocat/Hello-World",
* devicesApprovalOn: true,
* devicesAutoUpdatesOn: true,
* devicesKeyDurationDays: 5,
* usersApprovalOn: true,
* usersRoleAllowedToJoinExternalTailnet: "member",
* postureIdentityCollectionOn: true,
* httpsEnabled: true,
* });
* ```
*
* ## Import
*
* The `pulumi import` command can be used, for example:
*
* ID doesn't matter.
*
* ```sh
* $ pulumi import tailscale:index/tailnetSettings:TailnetSettings sample_preferences tailnet_settings
* ```
*/
class TailnetSettings extends pulumi.CustomResource {
/**
* Get an existing TailnetSettings 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 TailnetSettings(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TailnetSettings. 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'] === TailnetSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aclsExternalLink"] = state?.aclsExternalLink;
resourceInputs["aclsExternallyManagedOn"] = state?.aclsExternallyManagedOn;
resourceInputs["devicesApprovalOn"] = state?.devicesApprovalOn;
resourceInputs["devicesAutoUpdatesOn"] = state?.devicesAutoUpdatesOn;
resourceInputs["devicesKeyDurationDays"] = state?.devicesKeyDurationDays;
resourceInputs["httpsEnabled"] = state?.httpsEnabled;
resourceInputs["networkFlowLoggingOn"] = state?.networkFlowLoggingOn;
resourceInputs["postureIdentityCollectionOn"] = state?.postureIdentityCollectionOn;
resourceInputs["regionalRoutingOn"] = state?.regionalRoutingOn;
resourceInputs["usersApprovalOn"] = state?.usersApprovalOn;
resourceInputs["usersRoleAllowedToJoinExternalTailnet"] = state?.usersRoleAllowedToJoinExternalTailnet;
}
else {
const args = argsOrState;
resourceInputs["aclsExternalLink"] = args?.aclsExternalLink;
resourceInputs["aclsExternallyManagedOn"] = args?.aclsExternallyManagedOn;
resourceInputs["devicesApprovalOn"] = args?.devicesApprovalOn;
resourceInputs["devicesAutoUpdatesOn"] = args?.devicesAutoUpdatesOn;
resourceInputs["devicesKeyDurationDays"] = args?.devicesKeyDurationDays;
resourceInputs["httpsEnabled"] = args?.httpsEnabled;
resourceInputs["networkFlowLoggingOn"] = args?.networkFlowLoggingOn;
resourceInputs["postureIdentityCollectionOn"] = args?.postureIdentityCollectionOn;
resourceInputs["regionalRoutingOn"] = args?.regionalRoutingOn;
resourceInputs["usersApprovalOn"] = args?.usersApprovalOn;
resourceInputs["usersRoleAllowedToJoinExternalTailnet"] = args?.usersRoleAllowedToJoinExternalTailnet;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TailnetSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.TailnetSettings = TailnetSettings;
/** @internal */
TailnetSettings.__pulumiType = 'tailscale:index/tailnetSettings:TailnetSettings';
//# sourceMappingURL=tailnetSettings.js.map