3

我对 terraform databricks 实验室提供商有疑问,下面的代码给了我一个错误“状态 400:来自服务器的错误响应 {“error_code”:“INVALID_PARAMETER_VALUE”,“消息”:“路径必须是绝对的:databricks”}“有关于路径参数的文档中没有任何内容,我试过没有“dbfs:”位它也不喜欢它吗?欢迎任何帮助。

resource "databricks_dbfs_file" "log4j_files" {
  content = filebase64("${path.module}/log.txt")
  path = "dbfs://databricks/spark-log"
  overwrite = true
  mkdirs = true
  validate_remote_file = true
}
4

2 回答 2

2

Please make sure to use the latest version. Format of error message suggests you're using something before version 0.2.3.

Please do use source syntax of dbfs file resource, as shown this example for integration tests:

resource "databricks_dbfs_file" "show_variables" {
  source = "${path.module}/log.txt"
  path = "dbfs:/path/to/log.txt"
}
于 2020-09-26T12:50:37.200 回答
1

path 参数需要包含文件名。

这也是您需要的文档:https ://registry.terraform.io/providers/databrickslabs/databricks/latest/docs/resources/dbfs_file

于 2020-09-22T13:20:42.340 回答