Skip to content

Commit

Permalink
Exporter: use dbfs_path as reference for init scripts in clusters (#…
Browse files Browse the repository at this point in the history
…1892)

This fixes #1638
  • Loading branch information
alexott authored Jan 3, 2023
1 parent 242ff84 commit d20bae2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions exporter/importables.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ var resourcesMap map[string]importable = map[string]importable{
{Path: "aws_attributes.instance_profile_arn", Resource: "databricks_instance_profile"},
{Path: "instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "driver_instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "init_scripts.dbfs.destination", Resource: "databricks_dbfs_file"},
{Path: "init_scripts.dbfs.destination", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "library.jar", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "library.whl", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "library.egg", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
Expand Down Expand Up @@ -275,7 +275,7 @@ var resourcesMap map[string]importable = map[string]importable{
{Path: "email_notifications.on_success", Resource: "databricks_user", Match: "user_name"},
{Path: "email_notifications.on_start", Resource: "databricks_user", Match: "user_name"},
{Path: "new_cluster.aws_attributes.instance_profile_arn", Resource: "databricks_instance_profile"},
{Path: "new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file"},
{Path: "new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "new_cluster.instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "new_cluster.driver_instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "new_cluster.policy_id", Resource: "databricks_cluster_policy"},
Expand All @@ -301,13 +301,13 @@ var resourcesMap map[string]importable = map[string]importable{
{Path: "task.sql_task.warehouse_id", Resource: "databricks_sql_endpoint"},
{Path: "task.dbt_task.warehouse_id", Resource: "databricks_sql_endpoint"},
{Path: "task.new_cluster.aws_attributes.instance_profile_arn", Resource: "databricks_instance_profile"},
{Path: "task.new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file"},
{Path: "task.new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "task.new_cluster.instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "task.new_cluster.driver_instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "task.new_cluster.policy_id", Resource: "databricks_cluster_policy"},
{Path: "task.existing_cluster_id", Resource: "databricks_cluster"},
{Path: "job_cluster.new_cluster.aws_attributes.instance_profile_arn", Resource: "databricks_instance_profile"},
{Path: "job_cluster.new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file"},
{Path: "job_cluster.new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "job_cluster.new_cluster.instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "job_cluster.new_cluster.driver_instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "job_cluster.new_cluster.policy_id", Resource: "databricks_cluster_policy"},
Expand Down Expand Up @@ -1449,7 +1449,7 @@ var resourcesMap map[string]importable = map[string]importable{
},
Depends: []reference{
{Path: "cluster.aws_attributes.instance_profile_arn", Resource: "databricks_instance_profile"},
{Path: "new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file"},
{Path: "new_cluster.init_scripts.dbfs.destination", Resource: "databricks_dbfs_file", Match: "dbfs_path"},
{Path: "cluster.instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "cluster.driver_instance_pool_id", Resource: "databricks_instance_pool"},
{Path: "library.notebook.path", Resource: "databricks_notebook"},
Expand Down

0 comments on commit d20bae2

Please sign in to comment.