You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
## 0.5.7
4
4
5
-
* Added `external_id` and `force` attributes to `databricks_service_principal` resource ([#1293](https://github.com/databrickslabs/terraform-provider-databricks/pull/1293))
5
+
* Added `external_id` and `force` attributes to `databricks_service_principal` resource ([#1293](https://github.com/databrickslabs/terraform-provider-databricks/pull/1293)).
6
+
* Added documentation for `datarbicks_git_credential` resource ([#1295](https://github.com/databrickslabs/terraform-provider-databricks/pull/1295)).
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).
7
+
8
+
9
+
## Example Usage
10
+
11
+
You can declare Terraform-managed Git credential using following code:
12
+
13
+
```hcl
14
+
resource "databricks_git_credential" "ado" {
15
+
git_username = "myuser"
16
+
git_provider = "azureDevOpsServices"
17
+
personal_access_token = "sometoken"
18
+
}
19
+
```
20
+
21
+
## Argument Reference
22
+
23
+
24
+
The following arguments are supported:
25
+
26
+
*`personal_access_token` - (Required) The personal access token used to authenticate to the corresponding Git provider.
27
+
*`git_username` - (Required) user name at Git provider.
28
+
*`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](https://docs.databricks.com/dev-tools/api/latest/gitcredentials.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, `awsCodeCommit`.
29
+
*`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.
30
+
31
+
## Attribute Reference
32
+
33
+
In addition to all arguments above, the following attributes are exported:
34
+
35
+
*`id` - identifier of specific Git credential
36
+
37
+
## Import
38
+
39
+
The resource cluster can be imported using ID of Git credential that could be obtained via REST API:
Copy file name to clipboardExpand all lines: docs/resources/repo.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ subcategory: "Workspace"
5
5
6
6
This resource allows you to manage [Databricks Repos](https://docs.databricks.com/repos.html).
7
7
8
-
-> **Note** To create a Repo from a private repository you need to configure Git token as described in the [documentation](https://docs.databricks.com/repos.html#configure-your-git-integration-with-databricks). **Right now this is possible only via Databricks UI due lack of corresponding REST API**. For the same reason, it also doesn't work for Service Principals.
8
+
-> **Note** To create a Repo from a private repository you need to configure Git token as described in the [documentation](https://docs.databricks.com/repos.html#configure-your-git-integration-with-databricks). To set this token you can use [databricks_git_credential](git_credential.md) resource.
*`url` - (Required) The URL of the Git Repository to clone from. If value changes, repo is re-created
28
-
*`git_provider` - (Optional, if it's possible to detect Git provider by host name) case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult [Repos API documentation](https://docs.databricks.com/dev-tools/api/latest/repos.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`
29
-
*`path` - (Optional) path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (`/Repos/<username>/...`). If value changes, repo is re-created
27
+
*`url` - (Required) The URL of the Git Repository to clone from. If value changes, repo is re-created.
28
+
*`git_provider` - (Optional, if it's possible to detect Git provider by host name) case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult [Repos API documentation](https://docs.databricks.com/dev-tools/api/latest/repos.html)): `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, , `awsCodeCommit`.
29
+
*`path` - (Optional) path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (`/Repos/<username>/...`). If value changes, repo is re-created.
30
30
*`branch` - (Optional) name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with `tag`. If `branch` is removed, and `tag` isn't specified, then the repository will stay at the previously checked out state.
31
-
*`tag` - (Optional) name of the tag for initial checkout. Conflicts with `branch`
31
+
*`tag` - (Optional) name of the tag for initial checkout. Conflicts with `branch`.
The following resources are often used in the same context:
55
55
56
56
*[End to end workspace management](../guides/workspace-management.md) guide.
57
+
*[databricks_git_credential](git_credential.md) to manage Git credentials.
57
58
*[databricks_directory](directory.md) to manage directories in [Databricks Workpace](https://docs.databricks.com/workspace/workspace-objects.html).
58
59
*[databricks_pipeline](pipeline.md) to deploy [Delta Live Tables](https://docs.databricks.com/data-engineering/delta-live-tables/index.html).
59
60
*[databricks_secret](secret.md) to manage [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace.
0 commit comments