UNPKG

@pulumi/tailscale

Version:

A Pulumi package for creating and managing Tailscale cloud resources.

102 lines (101 loc) 5.59 kB
import * as pulumi from "@pulumi/pulumi"; /** * The provider type for the tailscale package. By default, resources use package-wide configuration * settings, however an explicit `Provider` instance may be created and passed during resource * construction to achieve fine-grained programmatic control over provider settings. See the * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. */ export declare class Provider extends pulumi.ProviderResource { /** * Returns true if the given object is an instance of Provider. 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 Provider; /** * The API key to use for authenticating requests to the API. Can be set via the TAILSCALE_API_KEY environment variable. Conflicts with 'oauth_client_id' and 'oauth_client_secret'. */ readonly apiKey: pulumi.Output<string | undefined>; /** * The base URL of the Tailscale API. Defaults to https://api.tailscale.com. Can be set via the TAILSCALE_BASE_URL environment variable. */ readonly baseUrl: pulumi.Output<string | undefined>; /** * The jwt identity token to exchange for a Tailscale API token when using a federated identity client. Can be set via the TAILSCALE_IDENTITY_TOKEN environment variable. Conflicts with 'api_key' and 'oauth_client_secret'. */ readonly identityToken: pulumi.Output<string | undefined>; /** * The OAuth application's ID when using OAuth client credentials. Can be set via the TAILSCALE_OAUTH_CLIENT_ID environment variable. Either 'oauth_client_secret' or 'identity_token' must be set alongside 'oauth_client_id'. Conflicts with 'api_key'. */ readonly oauthClientId: pulumi.Output<string | undefined>; /** * The OAuth application's secret when using OAuth client credentials. Can be set via the TAILSCALE_OAUTH_CLIENT_SECRET environment variable. Conflicts with 'api_key' and 'identity_token'. */ readonly oauthClientSecret: pulumi.Output<string | undefined>; /** * The tailnet ID. Tailnets created before Oct 2025 can still use the legacy ID, but the Tailnet ID is the preferred identifier. Can be set via the TAILSCALE_TAILNET environment variable. Default is the tailnet that owns API credentials passed to the provider. */ readonly tailnet: pulumi.Output<string | undefined>; /** * User-Agent header for API requests. */ readonly userAgent: pulumi.Output<string | undefined>; /** * Create a Provider 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?: ProviderArgs, opts?: pulumi.ResourceOptions); /** * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. */ terraformConfig(): pulumi.Output<Provider.TerraformConfigResult>; } /** * The set of arguments for constructing a Provider resource. */ export interface ProviderArgs { /** * The API key to use for authenticating requests to the API. Can be set via the TAILSCALE_API_KEY environment variable. Conflicts with 'oauth_client_id' and 'oauth_client_secret'. */ apiKey?: pulumi.Input<string>; /** * The base URL of the Tailscale API. Defaults to https://api.tailscale.com. Can be set via the TAILSCALE_BASE_URL environment variable. */ baseUrl?: pulumi.Input<string>; /** * The jwt identity token to exchange for a Tailscale API token when using a federated identity client. Can be set via the TAILSCALE_IDENTITY_TOKEN environment variable. Conflicts with 'api_key' and 'oauth_client_secret'. */ identityToken?: pulumi.Input<string>; /** * The OAuth application's ID when using OAuth client credentials. Can be set via the TAILSCALE_OAUTH_CLIENT_ID environment variable. Either 'oauth_client_secret' or 'identity_token' must be set alongside 'oauth_client_id'. Conflicts with 'api_key'. */ oauthClientId?: pulumi.Input<string>; /** * The OAuth application's secret when using OAuth client credentials. Can be set via the TAILSCALE_OAUTH_CLIENT_SECRET environment variable. Conflicts with 'api_key' and 'identity_token'. */ oauthClientSecret?: pulumi.Input<string>; /** * The OAuth 2.0 scopes to request when generating the access token using the supplied OAuth client credentials. See https://tailscale.com/kb/1215/oauth-clients/#scopes for available scopes. Only valid when both 'oauth_client_id' and 'oauth_client_secret' are set. */ scopes?: pulumi.Input<pulumi.Input<string>[]>; /** * The tailnet ID. Tailnets created before Oct 2025 can still use the legacy ID, but the Tailnet ID is the preferred identifier. Can be set via the TAILSCALE_TAILNET environment variable. Default is the tailnet that owns API credentials passed to the provider. */ tailnet?: pulumi.Input<string>; /** * User-Agent header for API requests. */ userAgent?: pulumi.Input<string>; } export declare namespace Provider { /** * The results of the Provider.terraformConfig method. */ interface TerraformConfigResult { readonly result: { [key: string]: any; }; } }