terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Provider issue: Azure DevOps private repo fails with the resource databricks_repo
Hi there,
I found this error while provisioning with provider version v1.0.0:
Plan: 2 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
databricks_directory.dir_git_repos: Creating...
databricks_directory.dir_git_repos: Creation complete after 1s [id=/Repos/DataScience/]
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for databricks_repo.git_repo_bidatabricks-ds to
│ include new values learned so far during apply, provider
│ "registry.terraform.io/databricks/databricks" produced an invalid new value
│ for .path: was cty.StringVal("/Repos/DataScience/"), but now
│ cty.StringVal("/Repos/DataScience").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Releasing state lock. This may take a few moments...
Configuration
resource "databricks_directory" "dir_git_repos" {
path = "/Repos/DataScience/"
delete_recursive = true
lifecycle {
create_before_destroy = true
}
}
resource "databricks_repo" "git_repo_association" {
git_provider = "azureDevOpsServices"
url = local.git_repo
branch = local.meurepo
path = databricks_directory.dir_git_repos.path
lifecycle {
create_before_destroy = true
}
depends_on = [
databricks_directory.dir_git_repos,
]
}
Expected Behavior
What should have happened?
- Add a folder in workspace
- associate the gitrepository inside
Actual Behavior
What actually happened?
- Crashed
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform applycode above.
Terraform and provider versions
terraform version:v1.2.3- provider version:
v1.0.0
Debug Output
Included above.
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.
Important Factoids
Are there anything atypical about your accounts that we should know? No
hi @juarezr , are you sure that path = "/Repos/DataScience/" did work before? please try without the trailing slash in the meantime, while we add sanitization in the next release.
Hi @nfx,
- It happened in a brand new workspace.
- It was fix by this:
- databricks_directory
- path = "/Repos/DataScience/"
- databricks_repo
- path = "/Repos/DataScience/git_reposiory_name"
- databricks_directory
@juarezr you don't need databricks_directory - directories will be created automatically.
But really, repository path always should be 3 parts -> /Repos, directory (user or custom), repo-name
@alexott i think it's because of the sanitization done in the repo "create" phase. you should do it on "CustomizeDiff" phase
Following up - is this issue still relevant?
It should be fixed by #1702