UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

119 lines (118 loc) 5.92 kB
import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to manage credentials for [Databricks Repos](https://docs.databricks.com/repos.html) using [Git Credentials API](https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html). * * ## Example Usage * * You can declare Pulumi-managed Git credential using following code: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ado = new databricks.GitCredential("ado", { * gitUsername: "myuser", * gitProvider: "azureDevOpsServices", * personalAccessToken: "sometoken", * }); * ``` * * ## Related Resources * * The following resources are often used in the same context: * * * databricks.Repo to manage Databricks Repos. * * ## Import * * The resource cluster can be imported using ID of Git credential that could be obtained via REST API: * * bash * * ```sh * $ pulumi import databricks:index/gitCredential:GitCredential this <git-credential-id> * ``` */ export declare class GitCredential extends pulumi.CustomResource { /** * Get an existing GitCredential 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?: GitCredentialState, opts?: pulumi.CustomResourceOptions): GitCredential; /** * Returns true if the given object is an instance of GitCredential. 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 GitCredential; /** * specify if settings need to be enforced - right now, Databricks allows only single Git credential, so if it's already configured, the apply operation will fail. */ readonly force: pulumi.Output<boolean | undefined>; /** * case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult [Git Credentials API documentation](https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, `awsCodeCommit`. */ readonly gitProvider: pulumi.Output<string>; /** * user name at Git provider. */ readonly gitUsername: pulumi.Output<string | undefined>; /** * The personal access token used to authenticate to the corresponding Git provider. If value is not provided, it's sourced from the first environment variable of `GITHUB_TOKEN`, `GITLAB_TOKEN`, or `AZDO_PERSONAL_ACCESS_TOKEN`, that has a non-empty value. */ readonly personalAccessToken: pulumi.Output<string | undefined>; /** * Create a GitCredential 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: GitCredentialArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GitCredential resources. */ export interface GitCredentialState { /** * specify if settings need to be enforced - right now, Databricks allows only single Git credential, so if it's already configured, the apply operation will fail. */ force?: pulumi.Input<boolean>; /** * case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult [Git Credentials API documentation](https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, `awsCodeCommit`. */ gitProvider?: pulumi.Input<string>; /** * user name at Git provider. */ gitUsername?: pulumi.Input<string>; /** * The personal access token used to authenticate to the corresponding Git provider. If value is not provided, it's sourced from the first environment variable of `GITHUB_TOKEN`, `GITLAB_TOKEN`, or `AZDO_PERSONAL_ACCESS_TOKEN`, that has a non-empty value. */ personalAccessToken?: pulumi.Input<string>; } /** * The set of arguments for constructing a GitCredential resource. */ export interface GitCredentialArgs { /** * specify if settings need to be enforced - right now, Databricks allows only single Git credential, so if it's already configured, the apply operation will fail. */ force?: pulumi.Input<boolean>; /** * case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult [Git Credentials API documentation](https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, `awsCodeCommit`. */ gitProvider: pulumi.Input<string>; /** * user name at Git provider. */ gitUsername?: pulumi.Input<string>; /** * The personal access token used to authenticate to the corresponding Git provider. If value is not provided, it's sourced from the first environment variable of `GITHUB_TOKEN`, `GITLAB_TOKEN`, or `AZDO_PERSONAL_ACCESS_TOKEN`, that has a non-empty value. */ personalAccessToken?: pulumi.Input<string>; }