@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
195 lines (194 loc) • 7.24 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The tailnetKey resource allows you to create pre-authentication keys that can register new nodes without needing to sign in via a web browser. See https://tailscale.com/kb/1085/auth-keys for more information
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleKey = new tailscale.TailnetKey("sample_key", {
* reusable: true,
* ephemeral: false,
* preauthorized: true,
* expiry: 3600,
* description: "Sample key",
* });
* ```
*
* ## Import
*
* Tailnet key can be imported using the key id, e.g.,
*
* ```sh
* $ pulumi import tailscale:index/tailnetKey:TailnetKey sample_key 123456789
* ```
*
* -> ** Note ** the `key` attribute will not be populated on import as this attribute is only populated
*
* on resource creation.
*/
export declare class TailnetKey extends pulumi.CustomResource {
/**
* Get an existing TailnetKey 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?: TailnetKeyState, opts?: pulumi.CustomResourceOptions): TailnetKey;
/**
* Returns true if the given object is an instance of TailnetKey. 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 TailnetKey;
/**
* The creation timestamp of the key in RFC3339 format
*/
readonly createdAt: pulumi.Output<string>;
/**
* A description of the key consisting of alphanumeric characters. Defaults to `""`.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Indicates if the key is ephemeral. Defaults to `false`.
*/
readonly ephemeral: pulumi.Output<boolean | undefined>;
/**
* The expiry timestamp of the key in RFC3339 format
*/
readonly expiresAt: pulumi.Output<string>;
/**
* The expiry of the key in seconds. Defaults to `7776000` (90 days).
*/
readonly expiry: pulumi.Output<number>;
/**
* Indicates whether the key is invalid (e.g. expired, revoked or has been deleted).
*/
readonly invalid: pulumi.Output<boolean>;
/**
* The authentication key
*/
readonly key: pulumi.Output<string>;
/**
* Determines whether or not the machines authenticated by the key will be authorized for the tailnet by default. Defaults to `false`.
*/
readonly preauthorized: pulumi.Output<boolean | undefined>;
/**
* Determines whether the key should be created again if it becomes invalid. By default, reusable keys will be recreated, but single-use keys will not. Possible values: 'always', 'never'.
*/
readonly recreateIfInvalid: pulumi.Output<string | undefined>;
/**
* Indicates if the key is reusable or single-use. Defaults to `false`.
*/
readonly reusable: pulumi.Output<boolean | undefined>;
/**
* List of tags to apply to the machines authenticated by the key.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* ID of the user who created this key, empty for keys created by OAuth clients.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a TailnetKey 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?: TailnetKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering TailnetKey resources.
*/
export interface TailnetKeyState {
/**
* The creation timestamp of the key in RFC3339 format
*/
createdAt?: pulumi.Input<string>;
/**
* A description of the key consisting of alphanumeric characters. Defaults to `""`.
*/
description?: pulumi.Input<string>;
/**
* Indicates if the key is ephemeral. Defaults to `false`.
*/
ephemeral?: pulumi.Input<boolean>;
/**
* The expiry timestamp of the key in RFC3339 format
*/
expiresAt?: pulumi.Input<string>;
/**
* The expiry of the key in seconds. Defaults to `7776000` (90 days).
*/
expiry?: pulumi.Input<number>;
/**
* Indicates whether the key is invalid (e.g. expired, revoked or has been deleted).
*/
invalid?: pulumi.Input<boolean>;
/**
* The authentication key
*/
key?: pulumi.Input<string>;
/**
* Determines whether or not the machines authenticated by the key will be authorized for the tailnet by default. Defaults to `false`.
*/
preauthorized?: pulumi.Input<boolean>;
/**
* Determines whether the key should be created again if it becomes invalid. By default, reusable keys will be recreated, but single-use keys will not. Possible values: 'always', 'never'.
*/
recreateIfInvalid?: pulumi.Input<string>;
/**
* Indicates if the key is reusable or single-use. Defaults to `false`.
*/
reusable?: pulumi.Input<boolean>;
/**
* List of tags to apply to the machines authenticated by the key.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* ID of the user who created this key, empty for keys created by OAuth clients.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a TailnetKey resource.
*/
export interface TailnetKeyArgs {
/**
* A description of the key consisting of alphanumeric characters. Defaults to `""`.
*/
description?: pulumi.Input<string>;
/**
* Indicates if the key is ephemeral. Defaults to `false`.
*/
ephemeral?: pulumi.Input<boolean>;
/**
* The expiry of the key in seconds. Defaults to `7776000` (90 days).
*/
expiry?: pulumi.Input<number>;
/**
* Determines whether or not the machines authenticated by the key will be authorized for the tailnet by default. Defaults to `false`.
*/
preauthorized?: pulumi.Input<boolean>;
/**
* Determines whether the key should be created again if it becomes invalid. By default, reusable keys will be recreated, but single-use keys will not. Possible values: 'always', 'never'.
*/
recreateIfInvalid?: pulumi.Input<string>;
/**
* Indicates if the key is reusable or single-use. Defaults to `false`.
*/
reusable?: pulumi.Input<boolean>;
/**
* List of tags to apply to the machines authenticated by the key.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* ID of the user who created this key, empty for keys created by OAuth clients.
*/
userId?: pulumi.Input<string>;
}