Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Issue with databricks_dbfs_file resource #1638

Closed
rohitnijhawan opened this issue Sep 28, 2022 · 0 comments · Fixed by #1892
Closed

[ISSUE] Issue with databricks_dbfs_file resource #1638

rohitnijhawan opened this issue Sep 28, 2022 · 0 comments · Fixed by #1892
Labels
exporter TF configuration generator

Comments

@rohitnijhawan
Copy link
Contributor

When running the exporter, it finds init scripts on dbfs and/or s3.
The exporter creates a definition as such
The exporter does not supply the dbfs:/ scheme

Configuration

resource "databricks_dbfs_file" "_instal_awscli.sh_some_hash_1" {
    source = "${path.module}/files/_instal_awscli.sh_some_hash_1"
    path = "/FileStore/scripts/instal_awscli.sh"
}

Expected Behavior

The file should be uploaded to dbfs from source

Actual Behavior

Error: cannot create cluster: Validation failed for init_scripts.1.dbfs.destination, the value must be dbfs:/FileStore/scripts/instal_awscli.sh (is "/FileStore/scripts/instal_awscli.sh")

Steps to Remediate

Manually change the path to include dbfs:/ prefix

resource "databricks_dbfs_file" "_instal_awscli.sh_some_hash_1" {
    source = "${path.module}/files/_instal_awscli.sh_some_hash_1"
    path = "dbfs:/FileStore/scripts/instal_awscli.sh"
}

However the following error was issued

dbfs1

Steps to Reproduce

Add an init script to cluster in workspace
Screen Shot 2022-09-28 at 3 40 49 PM

Run exporter
Run plan
Run apply

Terraform and provider versions

TF > 0.15
DB Provider > 1.2.0

Important Factoids

The plan defaults to a dbfs scheme - we see this in the terraform plan output

dbfs2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter TF configuration generator
Projects
None yet
2 participants