From 4dba35dff47cb7a0bff87358f6f5457c2dc4393a Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Wed, 5 Mar 2025 10:20:55 +0000 Subject: [PATCH] Upgrade TF provider to 1.68.0 (#2426) ## Changes Upgrade TF provider to 1.68.0 - Added support for Volumes as a destination for Cluster log conf --- acceptance/terraform/main.tf | 2 +- acceptance/terraform/output.txt | 6 ++-- bundle/internal/tf/codegen/schema/version.go | 2 +- bundle/internal/tf/schema/data_source_app.go | 1 + bundle/internal/tf/schema/data_source_apps.go | 1 + .../internal/tf/schema/data_source_cluster.go | 18 +++++++--- .../tf/schema/data_source_dashboards.go | 21 +++++++++++ bundle/internal/tf/schema/data_sources.go | 2 ++ bundle/internal/tf/schema/resource_app.go | 1 + bundle/internal/tf/schema/resource_cluster.go | 9 +++-- .../internal/tf/schema/resource_connection.go | 28 ++++++++++----- bundle/internal/tf/schema/resource_job.go | 36 ++++++++++++++----- .../internal/tf/schema/resource_pipeline.go | 9 +++-- bundle/internal/tf/schema/root.go | 2 +- 14 files changed, 107 insertions(+), 31 deletions(-) create mode 100644 bundle/internal/tf/schema/data_source_dashboards.go diff --git a/acceptance/terraform/main.tf b/acceptance/terraform/main.tf index 674b41a3c..822bc1a5a 100644 --- a/acceptance/terraform/main.tf +++ b/acceptance/terraform/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { databricks = { source = "databricks/databricks" - version = "1.65.1" + version = "1.68.0" } } diff --git a/acceptance/terraform/output.txt b/acceptance/terraform/output.txt index 851785827..f6280c5dc 100644 --- a/acceptance/terraform/output.txt +++ b/acceptance/terraform/output.txt @@ -4,9 +4,9 @@ Initializing the backend... Initializing provider plugins... -- Finding databricks/databricks versions matching "1.65.1"... -- Installing databricks/databricks v1.65.1... -- Installed databricks/databricks v1.65.1 (unauthenticated) +- Finding databricks/databricks versions matching "1.68.0"... +- Installing databricks/databricks v1.68.0... +- Installed databricks/databricks v1.68.0 (unauthenticated) Terraform has created a lock file .terraform.lock.hcl to record the provider selections it made above. Include this file in your version control repository diff --git a/bundle/internal/tf/codegen/schema/version.go b/bundle/internal/tf/codegen/schema/version.go index 46548f3e8..50a52d19e 100644 --- a/bundle/internal/tf/codegen/schema/version.go +++ b/bundle/internal/tf/codegen/schema/version.go @@ -1,3 +1,3 @@ package schema -const ProviderVersion = "1.65.1" +const ProviderVersion = "1.68.0" diff --git a/bundle/internal/tf/schema/data_source_app.go b/bundle/internal/tf/schema/data_source_app.go index 9b4ef077e..3c5329e3e 100644 --- a/bundle/internal/tf/schema/data_source_app.go +++ b/bundle/internal/tf/schema/data_source_app.go @@ -90,6 +90,7 @@ type DataSourceAppApp struct { Creator string `json:"creator,omitempty"` DefaultSourceCodePath string `json:"default_source_code_path,omitempty"` Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` Name string `json:"name"` PendingDeployment *DataSourceAppAppPendingDeployment `json:"pending_deployment,omitempty"` Resources []DataSourceAppAppResources `json:"resources,omitempty"` diff --git a/bundle/internal/tf/schema/data_source_apps.go b/bundle/internal/tf/schema/data_source_apps.go index dd381eabf..6799468f8 100644 --- a/bundle/internal/tf/schema/data_source_apps.go +++ b/bundle/internal/tf/schema/data_source_apps.go @@ -90,6 +90,7 @@ type DataSourceAppsApp struct { Creator string `json:"creator,omitempty"` DefaultSourceCodePath string `json:"default_source_code_path,omitempty"` Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` Name string `json:"name"` PendingDeployment *DataSourceAppsAppPendingDeployment `json:"pending_deployment,omitempty"` Resources []DataSourceAppsAppResources `json:"resources,omitempty"` diff --git a/bundle/internal/tf/schema/data_source_cluster.go b/bundle/internal/tf/schema/data_source_cluster.go index 38cb534f2..5f139854f 100644 --- a/bundle/internal/tf/schema/data_source_cluster.go +++ b/bundle/internal/tf/schema/data_source_cluster.go @@ -46,9 +46,14 @@ type DataSourceClusterClusterInfoClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type DataSourceClusterClusterInfoClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type DataSourceClusterClusterInfoClusterLogConf struct { - Dbfs *DataSourceClusterClusterInfoClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *DataSourceClusterClusterInfoClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *DataSourceClusterClusterInfoClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *DataSourceClusterClusterInfoClusterLogConfS3 `json:"s3,omitempty"` + Volumes *DataSourceClusterClusterInfoClusterLogConfVolumes `json:"volumes,omitempty"` } type DataSourceClusterClusterInfoClusterLogStatus struct { @@ -191,9 +196,14 @@ type DataSourceClusterClusterInfoSpecClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type DataSourceClusterClusterInfoSpecClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type DataSourceClusterClusterInfoSpecClusterLogConf struct { - Dbfs *DataSourceClusterClusterInfoSpecClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *DataSourceClusterClusterInfoSpecClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *DataSourceClusterClusterInfoSpecClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *DataSourceClusterClusterInfoSpecClusterLogConfS3 `json:"s3,omitempty"` + Volumes *DataSourceClusterClusterInfoSpecClusterLogConfVolumes `json:"volumes,omitempty"` } type DataSourceClusterClusterInfoSpecClusterMountInfoNetworkFilesystemInfo struct { diff --git a/bundle/internal/tf/schema/data_source_dashboards.go b/bundle/internal/tf/schema/data_source_dashboards.go new file mode 100644 index 000000000..9a047388b --- /dev/null +++ b/bundle/internal/tf/schema/data_source_dashboards.go @@ -0,0 +1,21 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type DataSourceDashboardsDashboards struct { + CreateTime string `json:"create_time,omitempty"` + DashboardId string `json:"dashboard_id,omitempty"` + DisplayName string `json:"display_name,omitempty"` + Etag string `json:"etag,omitempty"` + LifecycleState string `json:"lifecycle_state,omitempty"` + ParentPath string `json:"parent_path,omitempty"` + Path string `json:"path,omitempty"` + SerializedDashboard string `json:"serialized_dashboard,omitempty"` + UpdateTime string `json:"update_time,omitempty"` + WarehouseId string `json:"warehouse_id,omitempty"` +} + +type DataSourceDashboards struct { + DashboardNameContains string `json:"dashboard_name_contains,omitempty"` + Dashboards []DataSourceDashboardsDashboards `json:"dashboards,omitempty"` +} diff --git a/bundle/internal/tf/schema/data_sources.go b/bundle/internal/tf/schema/data_sources.go index 1880db25a..a1b17d88d 100644 --- a/bundle/internal/tf/schema/data_sources.go +++ b/bundle/internal/tf/schema/data_sources.go @@ -18,6 +18,7 @@ type DataSources struct { CurrentConfig map[string]any `json:"databricks_current_config,omitempty"` CurrentMetastore map[string]any `json:"databricks_current_metastore,omitempty"` CurrentUser map[string]any `json:"databricks_current_user,omitempty"` + Dashboards map[string]any `json:"databricks_dashboards,omitempty"` DbfsFile map[string]any `json:"databricks_dbfs_file,omitempty"` DbfsFilePaths map[string]any `json:"databricks_dbfs_file_paths,omitempty"` Directory map[string]any `json:"databricks_directory,omitempty"` @@ -83,6 +84,7 @@ func NewDataSources() *DataSources { CurrentConfig: make(map[string]any), CurrentMetastore: make(map[string]any), CurrentUser: make(map[string]any), + Dashboards: make(map[string]any), DbfsFile: make(map[string]any), DbfsFilePaths: make(map[string]any), Directory: make(map[string]any), diff --git a/bundle/internal/tf/schema/resource_app.go b/bundle/internal/tf/schema/resource_app.go index cbce5ab0e..7a0e35c17 100644 --- a/bundle/internal/tf/schema/resource_app.go +++ b/bundle/internal/tf/schema/resource_app.go @@ -90,6 +90,7 @@ type ResourceApp struct { Creator string `json:"creator,omitempty"` DefaultSourceCodePath string `json:"default_source_code_path,omitempty"` Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` Name string `json:"name"` NoCompute bool `json:"no_compute,omitempty"` PendingDeployment *ResourceAppPendingDeployment `json:"pending_deployment,omitempty"` diff --git a/bundle/internal/tf/schema/resource_cluster.go b/bundle/internal/tf/schema/resource_cluster.go index 50395add9..c553a0b93 100644 --- a/bundle/internal/tf/schema/resource_cluster.go +++ b/bundle/internal/tf/schema/resource_cluster.go @@ -46,9 +46,14 @@ type ResourceClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourceClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourceClusterClusterLogConf struct { - Dbfs *ResourceClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourceClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourceClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourceClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourceClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourceClusterClusterMountInfoNetworkFilesystemInfo struct { diff --git a/bundle/internal/tf/schema/resource_connection.go b/bundle/internal/tf/schema/resource_connection.go index a249a5393..0fc7c05a7 100644 --- a/bundle/internal/tf/schema/resource_connection.go +++ b/bundle/internal/tf/schema/resource_connection.go @@ -3,13 +3,23 @@ package schema type ResourceConnection struct { - Comment string `json:"comment,omitempty"` - ConnectionType string `json:"connection_type"` - Id string `json:"id,omitempty"` - MetastoreId string `json:"metastore_id,omitempty"` - Name string `json:"name"` - Options map[string]string `json:"options"` - Owner string `json:"owner,omitempty"` - Properties map[string]string `json:"properties,omitempty"` - ReadOnly bool `json:"read_only,omitempty"` + Comment string `json:"comment,omitempty"` + ConnectionId string `json:"connection_id,omitempty"` + ConnectionType string `json:"connection_type,omitempty"` + CreatedAt int `json:"created_at,omitempty"` + CreatedBy string `json:"created_by,omitempty"` + CredentialType string `json:"credential_type,omitempty"` + FullName string `json:"full_name,omitempty"` + Id string `json:"id,omitempty"` + MetastoreId string `json:"metastore_id,omitempty"` + Name string `json:"name,omitempty"` + Options map[string]string `json:"options,omitempty"` + Owner string `json:"owner,omitempty"` + Properties map[string]string `json:"properties,omitempty"` + ProvisioningInfo []any `json:"provisioning_info,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` + SecurableType string `json:"securable_type,omitempty"` + UpdatedAt int `json:"updated_at,omitempty"` + UpdatedBy string `json:"updated_by,omitempty"` + Url string `json:"url,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_job.go b/bundle/internal/tf/schema/resource_job.go index 2c27f0be7..c07ac8a6b 100644 --- a/bundle/internal/tf/schema/resource_job.go +++ b/bundle/internal/tf/schema/resource_job.go @@ -114,9 +114,14 @@ type ResourceJobJobClusterNewClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourceJobJobClusterNewClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourceJobJobClusterNewClusterClusterLogConf struct { - Dbfs *ResourceJobJobClusterNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourceJobJobClusterNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourceJobJobClusterNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourceJobJobClusterNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourceJobJobClusterNewClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourceJobJobClusterNewClusterClusterMountInfoNetworkFilesystemInfo struct { @@ -339,9 +344,14 @@ type ResourceJobNewClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourceJobNewClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourceJobNewClusterClusterLogConf struct { - Dbfs *ResourceJobNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourceJobNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourceJobNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourceJobNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourceJobNewClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourceJobNewClusterClusterMountInfoNetworkFilesystemInfo struct { @@ -708,9 +718,14 @@ type ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourceJobTaskForEachTaskTaskNewClusterClusterLogConf struct { - Dbfs *ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourceJobTaskForEachTaskTaskNewClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourceJobTaskForEachTaskTaskNewClusterClusterMountInfoNetworkFilesystemInfo struct { @@ -1104,9 +1119,14 @@ type ResourceJobTaskNewClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourceJobTaskNewClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourceJobTaskNewClusterClusterLogConf struct { - Dbfs *ResourceJobTaskNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourceJobTaskNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourceJobTaskNewClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourceJobTaskNewClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourceJobTaskNewClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourceJobTaskNewClusterClusterMountInfoNetworkFilesystemInfo struct { diff --git a/bundle/internal/tf/schema/resource_pipeline.go b/bundle/internal/tf/schema/resource_pipeline.go index 8e260e65c..c38209ece 100644 --- a/bundle/internal/tf/schema/resource_pipeline.go +++ b/bundle/internal/tf/schema/resource_pipeline.go @@ -47,9 +47,14 @@ type ResourcePipelineClusterClusterLogConfS3 struct { Region string `json:"region,omitempty"` } +type ResourcePipelineClusterClusterLogConfVolumes struct { + Destination string `json:"destination"` +} + type ResourcePipelineClusterClusterLogConf struct { - Dbfs *ResourcePipelineClusterClusterLogConfDbfs `json:"dbfs,omitempty"` - S3 *ResourcePipelineClusterClusterLogConfS3 `json:"s3,omitempty"` + Dbfs *ResourcePipelineClusterClusterLogConfDbfs `json:"dbfs,omitempty"` + S3 *ResourcePipelineClusterClusterLogConfS3 `json:"s3,omitempty"` + Volumes *ResourcePipelineClusterClusterLogConfVolumes `json:"volumes,omitempty"` } type ResourcePipelineClusterGcpAttributes struct { diff --git a/bundle/internal/tf/schema/root.go b/bundle/internal/tf/schema/root.go index 816e8e6aa..54c19e7ad 100644 --- a/bundle/internal/tf/schema/root.go +++ b/bundle/internal/tf/schema/root.go @@ -21,7 +21,7 @@ type Root struct { const ProviderHost = "registry.terraform.io" const ProviderSource = "databricks/databricks" -const ProviderVersion = "1.65.1" +const ProviderVersion = "1.68.0" func NewRoot() *Root { return &Root{