[英]How to import Databricks mount using Terraform?
I want to import existing Databricks infrastructure to Terraform, but I can't import existing mounts.我想将现有的 Databricks 基础设施导入 Terraform,但我无法导入现有的安装。 I have a mount to the S3 bucket on AWS which is as follows:
dbfs:/mnt/copyprod
.我在 AWS 上安装了 S3 存储桶,如下所示:
dbfs:/mnt/copyprod
。 According to the official documentation of databricks provider this command should work:根据 databricks 提供者的官方文档,这个命令应该可以工作:
$ terraform import databricks_mount.this <mount_name>
I have created appropriate resource block我已经创建了适当的资源块
resource "databricks_mount" "copyprod" {
...
}
but when I try to run command terraform import databricks_mount.copyprod copyprod
, which worked for other resources, I always get the same error:但是当我尝试运行适用于其他资源的命令
terraform import databricks_mount.copyprod copyprod
时,我总是遇到同样的错误:
databricks_mount.copyprod: Importing from ID "copyprod"...
databricks_mount.copyprod: Import prepared!
Prepared databricks_mount for import
databricks_mount.copyprod: Refreshing state... [id=copyprod]
╷
│ Error: value of name is not specified or empty
What "value of name" is this?这是什么“名字的价值”? Where should I specify it?
我应该在哪里指定它? As I understand there is no need to define arguments in the resource block for import to work as it only updates
.tfstate
file, but even if I do (such as defining name
, bucket_name
etc.), the error is always the same.据我了解,无需在资源块中定义 arguments 即可导入,因为它仅更新
.tfstate
文件,但即使我这样做(例如定义name
、 bucket_name
等),错误总是相同的。 I also tried to pass <mount_name>
in different styles, but with no luck.我还尝试在不同的 styles 中传递
<mount_name>
,但没有运气。 How can I make this work?我怎样才能使这项工作?
Connection to Databricks is rather correct, as I can import other resources such as clusters or notebooks.与 Databricks 的连接相当正确,因为我可以导入其他资源,例如集群或笔记本。 I am using Terraform v1.0.9 and Databricks provider v0.4.2.
我正在使用 Terraform v1.0.9 和 Databricks 提供程序 v0.4.2。
This is a bug in the provider, and it looks like that it doesn't work correctly for a some time (although with different error) - I've tested with old implementations ( databricks_aws_s3_mount
and databricks_azure_adls_gen2_mount
) on 0.3.5 & 0.3.10 (versions before databricks_mount
resource was added).这是提供程序中的一个错误,看起来它在一段时间内无法正常工作(尽管有不同的错误)-我已经在 0.3.5 和 0.3.10 上使用旧实现(
databricks_aws_s3_mount
和databricks_azure_adls_gen2_mount
)进行了测试(添加databricks_mount
资源之前的版本)。
Please report this issue on Github (mention me in the text), I'll look into it early next week, or maybe over weekend if I have time.请在Github上报告此问题(在文中提及我),我将在下周初研究它,或者如果我有时间可能在周末研究。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.