Skip to content

Commit

Permalink
Upgrade TF provider to 1.46.0 (#1460)
Browse files Browse the repository at this point in the history
## Changes

Release notes in
https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.46.0

Notable changes since 1.43.0:
* The job resource has been migrated to the Go SDK. More fields are now
passed through from DABs into TF.
* Improved zero-value handling.

## Tests

n/a
  • Loading branch information
pietern authored May 31, 2024
1 parent ec33a7c commit 364a609
Show file tree
Hide file tree
Showing 17 changed files with 757 additions and 232 deletions.
2 changes: 1 addition & 1 deletion bundle/internal/tf/codegen/schema/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package schema

const ProviderVersion = "1.43.0"
const ProviderVersion = "1.46.0"
46 changes: 46 additions & 0 deletions bundle/internal/tf/schema/data_source_catalog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Generated from Databricks Terraform provider schema. DO NOT EDIT.

package schema

type DataSourceCatalogCatalogInfoEffectivePredictiveOptimizationFlag struct {
InheritedFromName string `json:"inherited_from_name,omitempty"`
InheritedFromType string `json:"inherited_from_type,omitempty"`
Value string `json:"value"`
}

type DataSourceCatalogCatalogInfoProvisioningInfo struct {
State string `json:"state,omitempty"`
}

type DataSourceCatalogCatalogInfo struct {
BrowseOnly bool `json:"browse_only,omitempty"`
CatalogType string `json:"catalog_type,omitempty"`
Comment string `json:"comment,omitempty"`
ConnectionName string `json:"connection_name,omitempty"`
CreatedAt int `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
EnablePredictiveOptimization string `json:"enable_predictive_optimization,omitempty"`
FullName string `json:"full_name,omitempty"`
IsolationMode string `json:"isolation_mode,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"`
ProviderName string `json:"provider_name,omitempty"`
SecurableKind string `json:"securable_kind,omitempty"`
SecurableType string `json:"securable_type,omitempty"`
ShareName string `json:"share_name,omitempty"`
StorageLocation string `json:"storage_location,omitempty"`
StorageRoot string `json:"storage_root,omitempty"`
UpdatedAt int `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
EffectivePredictiveOptimizationFlag *DataSourceCatalogCatalogInfoEffectivePredictiveOptimizationFlag `json:"effective_predictive_optimization_flag,omitempty"`
ProvisioningInfo *DataSourceCatalogCatalogInfoProvisioningInfo `json:"provisioning_info,omitempty"`
}

type DataSourceCatalog struct {
Id string `json:"id,omitempty"`
Name string `json:"name"`
CatalogInfo *DataSourceCatalogCatalogInfo `json:"catalog_info,omitempty"`
}
28 changes: 14 additions & 14 deletions bundle/internal/tf/schema/data_source_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ type DataSourceJobJobSettingsSettingsGitSource struct {
}

type DataSourceJobJobSettingsSettingsHealthRules struct {
Metric string `json:"metric,omitempty"`
Op string `json:"op,omitempty"`
Value int `json:"value,omitempty"`
Metric string `json:"metric"`
Op string `json:"op"`
Value int `json:"value"`
}

type DataSourceJobJobSettingsSettingsHealth struct {
Expand Down Expand Up @@ -222,7 +222,7 @@ type DataSourceJobJobSettingsSettingsJobClusterNewCluster struct {
}

type DataSourceJobJobSettingsSettingsJobCluster struct {
JobClusterKey string `json:"job_cluster_key,omitempty"`
JobClusterKey string `json:"job_cluster_key"`
NewCluster *DataSourceJobJobSettingsSettingsJobClusterNewCluster `json:"new_cluster,omitempty"`
}

Expand Down Expand Up @@ -533,9 +533,9 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskEmailNotifications struc
}

type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskHealthRules struct {
Metric string `json:"metric,omitempty"`
Op string `json:"op,omitempty"`
Value int `json:"value,omitempty"`
Metric string `json:"metric"`
Op string `json:"op"`
Value int `json:"value"`
}

type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskHealth struct {
Expand Down Expand Up @@ -805,7 +805,7 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskSqlTaskQuery struct {

type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskSqlTask struct {
Parameters map[string]string `json:"parameters,omitempty"`
WarehouseId string `json:"warehouse_id,omitempty"`
WarehouseId string `json:"warehouse_id"`
Alert *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskSqlTaskAlert `json:"alert,omitempty"`
Dashboard *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskSqlTaskDashboard `json:"dashboard,omitempty"`
File *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskSqlTaskFile `json:"file,omitempty"`
Expand Down Expand Up @@ -844,7 +844,7 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTask struct {
MinRetryIntervalMillis int `json:"min_retry_interval_millis,omitempty"`
RetryOnTimeout bool `json:"retry_on_timeout,omitempty"`
RunIf string `json:"run_if,omitempty"`
TaskKey string `json:"task_key,omitempty"`
TaskKey string `json:"task_key"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
ConditionTask *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskConditionTask `json:"condition_task,omitempty"`
DbtTask *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskDbtTask `json:"dbt_task,omitempty"`
Expand Down Expand Up @@ -872,9 +872,9 @@ type DataSourceJobJobSettingsSettingsTaskForEachTask struct {
}

type DataSourceJobJobSettingsSettingsTaskHealthRules struct {
Metric string `json:"metric,omitempty"`
Op string `json:"op,omitempty"`
Value int `json:"value,omitempty"`
Metric string `json:"metric"`
Op string `json:"op"`
Value int `json:"value"`
}

type DataSourceJobJobSettingsSettingsTaskHealth struct {
Expand Down Expand Up @@ -1144,7 +1144,7 @@ type DataSourceJobJobSettingsSettingsTaskSqlTaskQuery struct {

type DataSourceJobJobSettingsSettingsTaskSqlTask struct {
Parameters map[string]string `json:"parameters,omitempty"`
WarehouseId string `json:"warehouse_id,omitempty"`
WarehouseId string `json:"warehouse_id"`
Alert *DataSourceJobJobSettingsSettingsTaskSqlTaskAlert `json:"alert,omitempty"`
Dashboard *DataSourceJobJobSettingsSettingsTaskSqlTaskDashboard `json:"dashboard,omitempty"`
File *DataSourceJobJobSettingsSettingsTaskSqlTaskFile `json:"file,omitempty"`
Expand Down Expand Up @@ -1183,7 +1183,7 @@ type DataSourceJobJobSettingsSettingsTask struct {
MinRetryIntervalMillis int `json:"min_retry_interval_millis,omitempty"`
RetryOnTimeout bool `json:"retry_on_timeout,omitempty"`
RunIf string `json:"run_if,omitempty"`
TaskKey string `json:"task_key,omitempty"`
TaskKey string `json:"task_key"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
ConditionTask *DataSourceJobJobSettingsSettingsTaskConditionTask `json:"condition_task,omitempty"`
DbtTask *DataSourceJobJobSettingsSettingsTaskDbtTask `json:"dbt_task,omitempty"`
Expand Down
19 changes: 19 additions & 0 deletions bundle/internal/tf/schema/data_source_mlflow_experiment.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Generated from Databricks Terraform provider schema. DO NOT EDIT.

package schema

type DataSourceMlflowExperimentTags struct {
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
}

type DataSourceMlflowExperiment struct {
ArtifactLocation string `json:"artifact_location,omitempty"`
CreationTime int `json:"creation_time,omitempty"`
ExperimentId string `json:"experiment_id,omitempty"`
Id string `json:"id,omitempty"`
LastUpdateTime int `json:"last_update_time,omitempty"`
LifecycleStage string `json:"lifecycle_stage,omitempty"`
Name string `json:"name,omitempty"`
Tags []DataSourceMlflowExperimentTags `json:"tags,omitempty"`
}
127 changes: 127 additions & 0 deletions bundle/internal/tf/schema/data_source_table.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// Generated from Databricks Terraform provider schema. DO NOT EDIT.

package schema

type DataSourceTableTableInfoColumnsMask struct {
FunctionName string `json:"function_name,omitempty"`
UsingColumnNames []string `json:"using_column_names,omitempty"`
}

type DataSourceTableTableInfoColumns struct {
Comment string `json:"comment,omitempty"`
Name string `json:"name,omitempty"`
Nullable bool `json:"nullable,omitempty"`
PartitionIndex int `json:"partition_index,omitempty"`
Position int `json:"position,omitempty"`
TypeIntervalType string `json:"type_interval_type,omitempty"`
TypeJson string `json:"type_json,omitempty"`
TypeName string `json:"type_name,omitempty"`
TypePrecision int `json:"type_precision,omitempty"`
TypeScale int `json:"type_scale,omitempty"`
TypeText string `json:"type_text,omitempty"`
Mask *DataSourceTableTableInfoColumnsMask `json:"mask,omitempty"`
}

type DataSourceTableTableInfoDeltaRuntimePropertiesKvpairs struct {
DeltaRuntimeProperties map[string]string `json:"delta_runtime_properties"`
}

type DataSourceTableTableInfoEffectivePredictiveOptimizationFlag struct {
InheritedFromName string `json:"inherited_from_name,omitempty"`
InheritedFromType string `json:"inherited_from_type,omitempty"`
Value string `json:"value"`
}

type DataSourceTableTableInfoEncryptionDetailsSseEncryptionDetails struct {
Algorithm string `json:"algorithm,omitempty"`
AwsKmsKeyArn string `json:"aws_kms_key_arn,omitempty"`
}

type DataSourceTableTableInfoEncryptionDetails struct {
SseEncryptionDetails *DataSourceTableTableInfoEncryptionDetailsSseEncryptionDetails `json:"sse_encryption_details,omitempty"`
}

type DataSourceTableTableInfoRowFilter struct {
FunctionName string `json:"function_name"`
InputColumnNames []string `json:"input_column_names"`
}

type DataSourceTableTableInfoTableConstraintsForeignKeyConstraint struct {
ChildColumns []string `json:"child_columns"`
Name string `json:"name"`
ParentColumns []string `json:"parent_columns"`
ParentTable string `json:"parent_table"`
}

type DataSourceTableTableInfoTableConstraintsNamedTableConstraint struct {
Name string `json:"name"`
}

type DataSourceTableTableInfoTableConstraintsPrimaryKeyConstraint struct {
ChildColumns []string `json:"child_columns"`
Name string `json:"name"`
}

type DataSourceTableTableInfoTableConstraints struct {
ForeignKeyConstraint *DataSourceTableTableInfoTableConstraintsForeignKeyConstraint `json:"foreign_key_constraint,omitempty"`
NamedTableConstraint *DataSourceTableTableInfoTableConstraintsNamedTableConstraint `json:"named_table_constraint,omitempty"`
PrimaryKeyConstraint *DataSourceTableTableInfoTableConstraintsPrimaryKeyConstraint `json:"primary_key_constraint,omitempty"`
}

type DataSourceTableTableInfoViewDependenciesDependenciesFunction struct {
FunctionFullName string `json:"function_full_name"`
}

type DataSourceTableTableInfoViewDependenciesDependenciesTable struct {
TableFullName string `json:"table_full_name"`
}

type DataSourceTableTableInfoViewDependenciesDependencies struct {
Function *DataSourceTableTableInfoViewDependenciesDependenciesFunction `json:"function,omitempty"`
Table *DataSourceTableTableInfoViewDependenciesDependenciesTable `json:"table,omitempty"`
}

type DataSourceTableTableInfoViewDependencies struct {
Dependencies []DataSourceTableTableInfoViewDependenciesDependencies `json:"dependencies,omitempty"`
}

type DataSourceTableTableInfo struct {
AccessPoint string `json:"access_point,omitempty"`
BrowseOnly bool `json:"browse_only,omitempty"`
CatalogName string `json:"catalog_name,omitempty"`
Comment string `json:"comment,omitempty"`
CreatedAt int `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
DataSourceFormat string `json:"data_source_format,omitempty"`
DeletedAt int `json:"deleted_at,omitempty"`
EnablePredictiveOptimization string `json:"enable_predictive_optimization,omitempty"`
FullName string `json:"full_name,omitempty"`
MetastoreId string `json:"metastore_id,omitempty"`
Name string `json:"name,omitempty"`
Owner string `json:"owner,omitempty"`
PipelineId string `json:"pipeline_id,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
SchemaName string `json:"schema_name,omitempty"`
SqlPath string `json:"sql_path,omitempty"`
StorageCredentialName string `json:"storage_credential_name,omitempty"`
StorageLocation string `json:"storage_location,omitempty"`
TableId string `json:"table_id,omitempty"`
TableType string `json:"table_type,omitempty"`
UpdatedAt int `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
ViewDefinition string `json:"view_definition,omitempty"`
Columns []DataSourceTableTableInfoColumns `json:"columns,omitempty"`
DeltaRuntimePropertiesKvpairs *DataSourceTableTableInfoDeltaRuntimePropertiesKvpairs `json:"delta_runtime_properties_kvpairs,omitempty"`
EffectivePredictiveOptimizationFlag *DataSourceTableTableInfoEffectivePredictiveOptimizationFlag `json:"effective_predictive_optimization_flag,omitempty"`
EncryptionDetails *DataSourceTableTableInfoEncryptionDetails `json:"encryption_details,omitempty"`
RowFilter *DataSourceTableTableInfoRowFilter `json:"row_filter,omitempty"`
TableConstraints []DataSourceTableTableInfoTableConstraints `json:"table_constraints,omitempty"`
ViewDependencies *DataSourceTableTableInfoViewDependencies `json:"view_dependencies,omitempty"`
}

type DataSourceTable struct {
Id string `json:"id,omitempty"`
Name string `json:"name"`
TableInfo *DataSourceTableTableInfo `json:"table_info,omitempty"`
}
Loading

0 comments on commit 364a609

Please sign in to comment.