Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.27 KB

git_credential.md

File metadata and controls

47 lines (31 loc) · 2.27 KB
subcategory
Workspace

databricks_git_credential Resource

This resource allows you to manage credentials for Databricks Repos using Git Credentials API.

Example Usage

You can declare Terraform-managed Git credential using following code:

resource "databricks_git_credential" "ado" {
  git_username          = "myuser"
  git_provider          = "azureDevOpsServices"
  personal_access_token = "sometoken"
}

Argument Reference

The following arguments are supported:

  • personal_access_token - (Required) 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.
  • git_username - (Required) user name at Git provider.
  • git_provider - (Required) 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): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
  • force - (Optional) 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.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • id - identifier of specific Git credential

Import

The resource cluster can be imported using ID of Git credential that could be obtained via REST API:

terraform import databricks_git_credential.this <git-credential-id>

Related Resources

The following resources are often used in the same context: