diff --git a/docs/source/provider/resources/db_dbfs_file_sync.md b/docs/source/provider/resources/db_dbfs_file_sync.md new file mode 100644 index 000000000..875e8141e --- /dev/null +++ b/docs/source/provider/resources/db_dbfs_file_sync.md @@ -0,0 +1,71 @@ +# Resource: db_dbfs_file_sync + +This resource will let you create a dbfs file sync which will synchronize files between systems depending on file size +changes. + +.. Warning This dbfs file sync resource only determines differences via file size so if data changes but file size does not +it will provide a false negative in terms of determining difference. + +## Example Usage + +.. code-block:: tf + + + data "db_dbfs_file" "my_dbfs_file_data" { + path = "/install_wheels_sri.sh" + limit_file_size = true + } + + resource "db_dbfs_file_sync" "my-file1-sync" { + src_path = data.db_dbfs_file.my_dbfs_file_data.path + tgt_path = "/terraformdbfs/example/wheels.sh" + file_size = data.db_dbfs_file.my-dbfs-file-data.file_size + mkdirs = true + + host = "https://.com/" + token = "dapiherehereherehere" + } + + + +## Argument Reference + +The following arguments are supported: + +.. _r_dbfs_file_sync_src_path: +* :ref:`src_path ` - **(Required)** The source path in dbfs where to fetch the file from. +It should look like "dbfs:/path/to/my/file". + +.. _r_dbfs_file_sync_tgt_path: +* :ref:`tgt_path ` - **(Required)** The target path in dbfs where to sync the file to. +It should look like "dbfs:/path/to/my/file". + +.. _r_dbfs_file_sync_file_size: +* :ref:`file_size ` - **(Required)** This is the value that is used to determine file change. +Unfortunately at this point in time there are no file checksums provided by the dbfs api. To download the file everytime +terraform provides a Read operation during state refresh is not efficient. + +.. _r_dbfs_file_sync_mkdirs: +* :ref:`mkdirs ` - **(Optional)** This is whether the resource should create the required, +parent directories to sync the file. The default value is true. + +.. _r_dbfs_file_sync_host: +* :ref:`host ` - **(Optional)** This is an optional api host for the databricks api if the source +file resides on another workspace/dbfs system. + +.. _r_dbfs_file_sync_token: +* :ref:`token ` - **(Optional)** This is an optional api token for the databricks api if the source +file resides on another workspace/dbfs system. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +.. _r_dbfs_file_sync_id: +* :ref:`id ` - Id for the file sync object. + + +## Import + +.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources_index.rst b/docs/source/provider/resources_index.rst index f062046ce..ab3f934e8 100644 --- a/docs/source/provider/resources_index.rst +++ b/docs/source/provider/resources_index.rst @@ -14,6 +14,7 @@ This section contains all the resources that can be managed by the Databricks Te db_cluster db_dbfs_file + db_dbfs_file_sync db_job db_instance_pool db_instance_profile