subcategory |
---|
Workspace |
This resource allows you to manage credentials for Databricks Repos using Git Credentials API.
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"
}
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 ofGITHUB_TOKEN
,GITLAB_TOKEN
, orAZDO_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.
In addition to all arguments above, the following attributes are exported:
id
- identifier of specific Git credential
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>
The following resources are often used in the same context:
- databricks_repo to manage Databricks Repos.