@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
121 lines (120 loc) • 4.81 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The oauthClient resource allows you to create OAuth clients to programmatically interact with the Tailscale API.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleClient = new tailscale.OauthClient("sample_client", {
* description: "sample client",
* scopes: ["all:read"],
* tags: ["tag:test"],
* });
* ```
*
* ## Import
*
* Note: Sensitive fields such as the secret key are not returned by the API and will be unset in the Terraform state after import.
*
* ```sh
* $ pulumi import tailscale:index/oauthClient:OauthClient example k1234511CNTRL
* ```
*/
export declare class OauthClient extends pulumi.CustomResource {
/**
* Get an existing OauthClient 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?: OauthClientState, opts?: pulumi.CustomResourceOptions): OauthClient;
/**
* Returns true if the given object is an instance of OauthClient. 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 OauthClient;
/**
* 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>;
/**
* The client secret, also known as the key. Used with the client ID to generate access tokens.
*/
readonly key: pulumi.Output<string>;
/**
* Scopes to grant to the client. See https://tailscale.com/kb/1215/ for a list of available scopes.
*/
readonly scopes: pulumi.Output<string[]>;
/**
* A list of tags that access tokens generated for the OAuth client will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* ID of the user who created this key, empty for OAuth clients created by other OAuth clients.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a OauthClient 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: OauthClientArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OauthClient resources.
*/
export interface OauthClientState {
/**
* 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>;
/**
* The client secret, also known as the key. Used with the client ID to generate access tokens.
*/
key?: pulumi.Input<string>;
/**
* Scopes to grant to the client. See https://tailscale.com/kb/1215/ for a list of available scopes.
*/
scopes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of tags that access tokens generated for the OAuth client will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* ID of the user who created this key, empty for OAuth clients created by other OAuth clients.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a OauthClient resource.
*/
export interface OauthClientArgs {
/**
* A description of the key consisting of alphanumeric characters. Defaults to `""`.
*/
description?: pulumi.Input<string>;
/**
* Scopes to grant to the client. See https://tailscale.com/kb/1215/ for a list of available scopes.
*/
scopes: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of tags that access tokens generated for the OAuth client will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}