databricks-cli/bundle/internal/tf/schema
Ilia Babanov 079c416f8d
Add `bundle debug terraform` command (#1294)
- Add `bundle debug terraform` command. It prints versions of the
Terraform and the Databricks Terraform provider. In the text mode it
also explains how to setup the CLI in environments with restricted
internet access.
- Use `DATABRICKS_TF_EXEC_PATH` env var to point Databricks CLI to the
Terraform binary. The CLI only uses it if `DATABRICKS_TF_VERSION`
matches the currently used terraform version.
- Use `DATABRICKS_TF_CLI_CONFIG_FILE` env var to point Terraform CLI
config that points to the filesystem mirror for the Databricks provider.
The CLI only uses it if `DATABRICKS_TF_PROVIDER_VERSION` matches the
currently used provider version.


Relevant PR on the VSCode extension side:
https://github.com/databricks/databricks-vscode/pull/1147

Example output of the `databricks bundle debug terraform`:
```
Terraform version: 1.5.5
Terraform URL: https://releases.hashicorp.com/terraform/1.5.5

Databricks Terraform Provider version: 1.38.0
Databricks Terraform Provider URL: https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.38.0

Databricks CLI downloads its Terraform dependencies automatically.

If you run the CLI in an air-gapped environment, you can download the dependencies manually and set these environment variables:

  DATABRICKS_TF_VERSION=1.5.5
  DATABRICKS_TF_EXEC_PATH=/path/to/terraform/binary
  DATABRICKS_TF_PROVIDER_VERSION=1.38.0
  DATABRICKS_TF_CLI_CONFIG_FILE=/path/to/terraform/cli/config.tfrc

Here is an example *.tfrc configuration file:

  disable_checkpoint = true
  provider_installation {
    filesystem_mirror {
      path = "/path/to/a/folder/with/databricks/terraform/provider"
    }
  }

The filesystem mirror path should point to the folder with the Databricks Terraform Provider. The folder should have this structure: /registry.terraform.io/databricks/databricks/terraform-provider-databricks_1.38.0_ARCH.zip

For more information about filesystem mirrors, see the Terraform documentation: https://developer.hashicorp.com/terraform/cli/config/config-file#filesystem_mirror
```

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2024-04-02 12:56:27 +00:00
..
config.go Update Terraform provider schema structs (#563) 2023-07-07 14:52:41 +02:00
data_source_aws_assume_role_policy.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_aws_bucket_policy.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_aws_crossaccount_policy.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_aws_unity_catalog_policy.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
data_source_catalogs.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_cluster.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
data_source_cluster_policy.go Update Terraform provider schema structs (#504) 2023-06-21 08:40:11 +02:00
data_source_clusters.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_current_config.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
data_source_current_metastore.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
data_source_current_user.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
data_source_dbfs_file.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_dbfs_file_paths.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_directory.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
data_source_group.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
data_source_instance_pool.go Update Terraform provider schema structs from 1.23.0 (#713) 2023-08-30 13:58:28 +00:00
data_source_instance_profiles.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
data_source_job.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
data_source_jobs.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_metastore.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
data_source_metastores.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
data_source_mlflow_model.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
data_source_mws_credentials.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
data_source_mws_workspaces.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_node_type.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
data_source_notebook.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_notebook_paths.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_pipelines.go Regenerated internal schema structs based on Terraform provider schemas (#401) 2023-05-23 19:33:24 +02:00
data_source_schemas.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_service_principal.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
data_source_service_principals.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_share.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
data_source_shares.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_spark_version.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_sql_warehouse.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
data_source_sql_warehouses.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_storage_credential.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
data_source_storage_credentials.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
data_source_tables.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_user.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
data_source_views.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_source_volumes.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
data_source_zones.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
data_sources.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_access_control_rule_set.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
resource_artifact_allowlist.go Bump Terraform provider to v1.29.0 (#926) 2023-10-27 09:16:41 +00:00
resource_aws_s3_mount.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_azure_adls_gen1_mount.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_azure_adls_gen2_mount.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_azure_blob_mount.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_catalog.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_catalog_workspace_binding.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_cluster.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_cluster_policy.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_connection.go Update Terraform provider schema structs from 1.23.0 (#713) 2023-08-30 13:58:28 +00:00
resource_dbfs_file.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_default_namespace_setting.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_directory.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_entitlements.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_external_location.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_file.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_git_credential.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_global_init_script.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_grant.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_grants.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_group.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
resource_group_instance_profile.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_group_member.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_group_role.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_instance_pool.go Update Terraform provider schema structs from 1.23.0 (#713) 2023-08-30 13:58:28 +00:00
resource_instance_profile.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_ip_access_list.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_job.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_library.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_metastore.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_metastore_assignment.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_metastore_data_access.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_mlflow_experiment.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_mlflow_model.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_mlflow_webhook.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_model_serving.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_mount.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_mws_credentials.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_mws_customer_managed_keys.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_mws_log_delivery.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_mws_networks.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_mws_permission_assignment.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_mws_private_access_settings.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_mws_storage_configurations.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_mws_vpc_endpoint.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_mws_workspaces.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_notebook.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_obo_token.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_permission_assignment.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_permissions.go Update Terraform provider schema structs (#504) 2023-06-21 08:40:11 +02:00
resource_pipeline.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_provider.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_recipient.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_registered_model.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_repo.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_schema.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_secret.go Update Terraform provider schema structs (#265) 2023-03-20 17:22:55 +01:00
resource_secret_acl.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_secret_scope.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_service_principal.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
resource_service_principal_role.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_service_principal_secret.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_share.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_sql_alert.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_sql_dashboard.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_sql_endpoint.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_sql_global_config.go Update Terraform provider schema structs (#563) 2023-07-07 14:52:41 +02:00
resource_sql_permissions.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_sql_query.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resource_sql_table.go Bump Terraform provider to v1.29.0 (#926) 2023-10-27 09:16:41 +00:00
resource_sql_visualization.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_sql_widget.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_storage_credential.go Bump Terraform provider to v1.36.2 (#1215) 2024-02-16 07:05:45 +00:00
resource_system_schema.go Bump Terraform provider to v1.28.0 (#871) 2023-10-16 12:52:16 +00:00
resource_table.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_token.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_user.go Regenerate bundle resource structs from latest terraform provider (#633) 2023-08-03 11:20:30 +00:00
resource_user_instance_profile.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_user_role.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_vector_search_endpoint.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_volume.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
resource_workspace_conf.go Generate equivalent Go types from Terraform provider schema (#122) 2022-12-06 16:26:19 +01:00
resource_workspace_file.go Upgrade Terraform schema version to v1.31.1 (#1055) 2023-12-11 21:53:21 +00:00
resources.go Upgrade Terraform provider to 1.37.0 (#1235) 2024-02-23 10:41:42 +00:00
root.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00