UNPKG

@pulumi/tailscale

Version:

A Pulumi package for creating and managing Tailscale cloud resources.

96 lines 4.94 kB
"use strict"; // *** 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, * }); * ``` * * ## Import * * 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, Object.assign(Object.assign({}, 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 ? state.aclsExternalLink : undefined; resourceInputs["aclsExternallyManagedOn"] = state ? state.aclsExternallyManagedOn : undefined; resourceInputs["devicesApprovalOn"] = state ? state.devicesApprovalOn : undefined; resourceInputs["devicesAutoUpdatesOn"] = state ? state.devicesAutoUpdatesOn : undefined; resourceInputs["devicesKeyDurationDays"] = state ? state.devicesKeyDurationDays : undefined; resourceInputs["networkFlowLoggingOn"] = state ? state.networkFlowLoggingOn : undefined; resourceInputs["postureIdentityCollectionOn"] = state ? state.postureIdentityCollectionOn : undefined; resourceInputs["regionalRoutingOn"] = state ? state.regionalRoutingOn : undefined; resourceInputs["usersApprovalOn"] = state ? state.usersApprovalOn : undefined; resourceInputs["usersRoleAllowedToJoinExternalTailnet"] = state ? state.usersRoleAllowedToJoinExternalTailnet : undefined; } else { const args = argsOrState; resourceInputs["aclsExternalLink"] = args ? args.aclsExternalLink : undefined; resourceInputs["aclsExternallyManagedOn"] = args ? args.aclsExternallyManagedOn : undefined; resourceInputs["devicesApprovalOn"] = args ? args.devicesApprovalOn : undefined; resourceInputs["devicesAutoUpdatesOn"] = args ? args.devicesAutoUpdatesOn : undefined; resourceInputs["devicesKeyDurationDays"] = args ? args.devicesKeyDurationDays : undefined; resourceInputs["networkFlowLoggingOn"] = args ? args.networkFlowLoggingOn : undefined; resourceInputs["postureIdentityCollectionOn"] = args ? args.postureIdentityCollectionOn : undefined; resourceInputs["regionalRoutingOn"] = args ? args.regionalRoutingOn : undefined; resourceInputs["usersApprovalOn"] = args ? args.usersApprovalOn : undefined; resourceInputs["usersRoleAllowedToJoinExternalTailnet"] = args ? args.usersRoleAllowedToJoinExternalTailnet : undefined; } 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