@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
93 lines (92 loc) • 3.32 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The deviceAuthorization resource is used to approve new devices before they can join the tailnet. See https://tailscale.com/kb/1099/device-authorization/ for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleDevice = tailscale.getDevice({
* name: "device.example.com",
* });
* const sampleAuthorization = new tailscale.DeviceAuthorization("sample_authorization", {
* deviceId: sampleDevice.then(sampleDevice => sampleDevice.nodeId),
* authorized: true,
* });
* ```
*
* ## Import
*
* Device authorization can be imported using the node ID (preferred), e.g.,
*
* ```sh
* $ pulumi import tailscale:index/deviceAuthorization:DeviceAuthorization sample_authorization nodeidCNTRL
* ```
*
* Device authorization can be imported using the legacy ID, e.g.,
*
* ```sh
* $ pulumi import tailscale:index/deviceAuthorization:DeviceAuthorization sample_authorization 123456789
* ```
*/
export declare class DeviceAuthorization extends pulumi.CustomResource {
/**
* Get an existing DeviceAuthorization 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: string, id: pulumi.Input<pulumi.ID>, state?: DeviceAuthorizationState, opts?: pulumi.CustomResourceOptions): DeviceAuthorization;
/**
* Returns true if the given object is an instance of DeviceAuthorization. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is DeviceAuthorization;
/**
* Whether or not the device is authorized
*/
readonly authorized: pulumi.Output<boolean>;
/**
* The device to set as authorized
*/
readonly deviceId: pulumi.Output<string>;
/**
* Create a DeviceAuthorization 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: string, args: DeviceAuthorizationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DeviceAuthorization resources.
*/
export interface DeviceAuthorizationState {
/**
* Whether or not the device is authorized
*/
authorized?: pulumi.Input<boolean>;
/**
* The device to set as authorized
*/
deviceId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a DeviceAuthorization resource.
*/
export interface DeviceAuthorizationArgs {
/**
* Whether or not the device is authorized
*/
authorized: pulumi.Input<boolean>;
/**
* The device to set as authorized
*/
deviceId: pulumi.Input<string>;
}