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, 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; /** * A description of the key consisting of alphanumeric characters. Defaults to `""`. */ readonly description: pulumi.Output; /** * Indicates if the key is ephemeral. Defaults to `false`. */ readonly ephemeral: pulumi.Output; /** * The expiry timestamp of the key in RFC3339 format */ readonly expiresAt: pulumi.Output; /** * The expiry of the key in seconds. Defaults to `7776000` (90 days). */ readonly expiry: pulumi.Output; /** * Indicates whether the key is invalid (e.g. expired, revoked or has been deleted). */ readonly invalid: pulumi.Output; /** * The authentication key */ readonly key: pulumi.Output; /** * 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; /** * 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; /** * Indicates if the key is reusable or single-use. Defaults to `false`. */ readonly reusable: pulumi.Output; /** * List of tags to apply to the machines authenticated by the key. */ readonly tags: pulumi.Output; /** * ID of the user who created this key, empty for keys created by OAuth clients. */ readonly userId: pulumi.Output; /** * 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; /** * A description of the key consisting of alphanumeric characters. Defaults to `""`. */ description?: pulumi.Input; /** * Indicates if the key is ephemeral. Defaults to `false`. */ ephemeral?: pulumi.Input; /** * The expiry timestamp of the key in RFC3339 format */ expiresAt?: pulumi.Input; /** * The expiry of the key in seconds. Defaults to `7776000` (90 days). */ expiry?: pulumi.Input; /** * Indicates whether the key is invalid (e.g. expired, revoked or has been deleted). */ invalid?: pulumi.Input; /** * The authentication key */ key?: pulumi.Input; /** * Determines whether or not the machines authenticated by the key will be authorized for the tailnet by default. Defaults to `false`. */ preauthorized?: pulumi.Input; /** * 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; /** * Indicates if the key is reusable or single-use. Defaults to `false`. */ reusable?: pulumi.Input; /** * List of tags to apply to the machines authenticated by the key. */ tags?: pulumi.Input[]>; /** * ID of the user who created this key, empty for keys created by OAuth clients. */ userId?: pulumi.Input; } /** * 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; /** * Indicates if the key is ephemeral. Defaults to `false`. */ ephemeral?: pulumi.Input; /** * The expiry of the key in seconds. Defaults to `7776000` (90 days). */ expiry?: pulumi.Input; /** * Determines whether or not the machines authenticated by the key will be authorized for the tailnet by default. Defaults to `false`. */ preauthorized?: pulumi.Input; /** * 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; /** * Indicates if the key is reusable or single-use. Defaults to `false`. */ reusable?: pulumi.Input; /** * List of tags to apply to the machines authenticated by the key. */ tags?: pulumi.Input[]>; /** * ID of the user who created this key, empty for keys created by OAuth clients. */ userId?: pulumi.Input; }