Skip to content

Commit 515d860

Browse files
authored
Document git_email in databricks_git_credential resource (#5099)
## Changes <!-- Summary of your changes that are easy to understand --> `git_username` is required when `git_email` is specified, but `git_email isn't required with `git_username`. However Terraform SDKv2 doesn't allow to express this kind of dependency, so I didn't modify the code (it should be possible with the Plugin Framework). ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [x] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework - [x] has entry in `NEXT_CHANGELOG.md` file
1 parent 87bef4f commit 515d860

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Documentation
1212

13+
* Document `git_email` in `databricks_git_credential` resource ([#5099](https://github.com/databricks/terraform-provider-databricks/pull/5099))
14+
1315
### Exporter
1416

1517
### Internal Changes

docs/resources/git_credential.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ resource "databricks_git_credential" "ado" {
3636
The following arguments are supported:
3737

3838
* `personal_access_token` - (Optional, required for some Git providers) 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`](https://registry.terraform.io/providers/integrations/github/latest/docs#oauth--personal-access-token), [`GITLAB_TOKEN`](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs#required), or [`AZDO_PERSONAL_ACCESS_TOKEN`](https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs#argument-reference), that has a non-empty value.
39-
* `git_username` - (Optional, required for some Git providers) user name at Git provider.
39+
* `git_username` - (Optional, required for some Git providers or when `git_email` is specified) user name at Git provider. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements.
40+
* `git_email` - (Optional, required for some Git providers) The email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits.
4041
* `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`, `azureDevOpsServicesAad`.
4142
* `is_default_for_provider` - (Optional) boolean flag specifying if the credential is the default for the given provider type.
4243
* `name` - (Optional) the name of the git credential, used for identification and ease of lookup.

0 commit comments

Comments
 (0)