mirror of https://github.com/databricks/cli.git
Upgrade to TF provider 1.52 (#1781)
## Changes Upgrade to TF provider 1.52 We also temporarily skip generating plugin framework structs to unblock upgrade as generation does not work yet and need to be fixed separately
This commit is contained in:
parent
e2c1d51d84
commit
cf989a7e10
|
@ -51,9 +51,15 @@ func (r *root) Generate(path string) error {
|
|||
}
|
||||
|
||||
func Run(ctx context.Context, schema *tfjson.ProviderSchema, path string) error {
|
||||
// Generate types for resources.
|
||||
// Generate types for resources
|
||||
var resources []*namedBlock
|
||||
for _, k := range sortKeys(schema.ResourceSchemas) {
|
||||
// Skipping all plugin framework struct generation.
|
||||
// TODO: This is a temporary fix, generation should be fixed in the future.
|
||||
if strings.HasSuffix(k, "_pluginframework") {
|
||||
continue
|
||||
}
|
||||
|
||||
v := schema.ResourceSchemas[k]
|
||||
b := &namedBlock{
|
||||
filePattern: "resource_%s.go",
|
||||
|
@ -71,6 +77,12 @@ func Run(ctx context.Context, schema *tfjson.ProviderSchema, path string) error
|
|||
// Generate types for data sources.
|
||||
var dataSources []*namedBlock
|
||||
for _, k := range sortKeys(schema.DataSourceSchemas) {
|
||||
// Skipping all plugin framework struct generation.
|
||||
// TODO: This is a temporary fix, generation should be fixed in the future.
|
||||
if strings.HasSuffix(k, "_pluginframework") {
|
||||
continue
|
||||
}
|
||||
|
||||
v := schema.DataSourceSchemas[k]
|
||||
b := &namedBlock{
|
||||
filePattern: "data_source_%s.go",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package schema
|
||||
|
||||
const ProviderVersion = "1.50.0"
|
||||
const ProviderVersion = "1.52.0"
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
|
||||
package schema
|
||||
|
||||
type DataSourceClusters struct {
|
||||
ClusterNameContains string `json:"cluster_name_contains,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Ids []string `json:"ids,omitempty"`
|
||||
type DataSourceClustersFilterBy struct {
|
||||
ClusterSources []string `json:"cluster_sources,omitempty"`
|
||||
ClusterStates []string `json:"cluster_states,omitempty"`
|
||||
IsPinned bool `json:"is_pinned,omitempty"`
|
||||
PolicyId string `json:"policy_id,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceClusters struct {
|
||||
ClusterNameContains string `json:"cluster_name_contains,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Ids []string `json:"ids,omitempty"`
|
||||
FilterBy *DataSourceClustersFilterBy `json:"filter_by,omitempty"`
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ type DataSourceExternalLocationExternalLocationInfo struct {
|
|||
CreatedBy string `json:"created_by,omitempty"`
|
||||
CredentialId string `json:"credential_id,omitempty"`
|
||||
CredentialName string `json:"credential_name,omitempty"`
|
||||
Fallback bool `json:"fallback,omitempty"`
|
||||
IsolationMode string `json:"isolation_mode,omitempty"`
|
||||
MetastoreId string `json:"metastore_id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
|
|
|
@ -18,12 +18,14 @@ type DataSourceShareObject struct {
|
|||
AddedBy string `json:"added_by,omitempty"`
|
||||
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
DataObjectType string `json:"data_object_type"`
|
||||
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
||||
Name string `json:"name"`
|
||||
SharedAs string `json:"shared_as,omitempty"`
|
||||
StartVersion int `json:"start_version,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
StringSharedAs string `json:"string_shared_as,omitempty"`
|
||||
Partition []DataSourceShareObjectPartition `json:"partition,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -2,20 +2,14 @@
|
|||
|
||||
package schema
|
||||
|
||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceEnablementDetails struct {
|
||||
ForcedForComplianceMode bool `json:"forced_for_compliance_mode,omitempty"`
|
||||
UnavailableForDisabledEntitlement bool `json:"unavailable_for_disabled_entitlement,omitempty"`
|
||||
UnavailableForNonEnterpriseTier bool `json:"unavailable_for_non_enterprise_tier,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedScheduleWindowStartTime struct {
|
||||
Hours int `json:"hours,omitempty"`
|
||||
Minutes int `json:"minutes,omitempty"`
|
||||
Hours int `json:"hours"`
|
||||
Minutes int `json:"minutes"`
|
||||
}
|
||||
|
||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedSchedule struct {
|
||||
DayOfWeek string `json:"day_of_week,omitempty"`
|
||||
Frequency string `json:"frequency,omitempty"`
|
||||
DayOfWeek string `json:"day_of_week"`
|
||||
Frequency string `json:"frequency"`
|
||||
WindowStartTime *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedScheduleWindowStartTime `json:"window_start_time,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -25,9 +19,9 @@ type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspa
|
|||
|
||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspace struct {
|
||||
CanToggle bool `json:"can_toggle,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
Enabled bool `json:"enabled"`
|
||||
EnablementDetails []any `json:"enablement_details,omitempty"`
|
||||
RestartEvenIfNoUpdatesAvailable bool `json:"restart_even_if_no_updates_available,omitempty"`
|
||||
EnablementDetails *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceEnablementDetails `json:"enablement_details,omitempty"`
|
||||
MaintenanceWindow *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindow `json:"maintenance_window,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ type ResourceCluster struct {
|
|||
IdempotencyToken string `json:"idempotency_token,omitempty"`
|
||||
InstancePoolId string `json:"instance_pool_id,omitempty"`
|
||||
IsPinned bool `json:"is_pinned,omitempty"`
|
||||
NoWait bool `json:"no_wait,omitempty"`
|
||||
NodeTypeId string `json:"node_type_id,omitempty"`
|
||||
NumWorkers int `json:"num_workers,omitempty"`
|
||||
PolicyId string `json:"policy_id,omitempty"`
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
package schema
|
||||
|
||||
type ResourceComplianceSecurityProfileWorkspaceSettingComplianceSecurityProfileWorkspace struct {
|
||||
ComplianceStandards []string `json:"compliance_standards,omitempty"`
|
||||
IsEnabled bool `json:"is_enabled,omitempty"`
|
||||
ComplianceStandards []string `json:"compliance_standards"`
|
||||
IsEnabled bool `json:"is_enabled"`
|
||||
}
|
||||
|
||||
type ResourceComplianceSecurityProfileWorkspaceSetting struct {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
package schema
|
||||
|
||||
type ResourceEnhancedSecurityMonitoringWorkspaceSettingEnhancedSecurityMonitoringWorkspace struct {
|
||||
IsEnabled bool `json:"is_enabled,omitempty"`
|
||||
IsEnabled bool `json:"is_enabled"`
|
||||
}
|
||||
|
||||
type ResourceEnhancedSecurityMonitoringWorkspaceSetting struct {
|
||||
|
|
|
@ -95,14 +95,16 @@ type ResourceModelServingConfigServedEntities struct {
|
|||
}
|
||||
|
||||
type ResourceModelServingConfigServedModels struct {
|
||||
EnvironmentVars map[string]string `json:"environment_vars,omitempty"`
|
||||
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
|
||||
ModelName string `json:"model_name"`
|
||||
ModelVersion string `json:"model_version"`
|
||||
Name string `json:"name,omitempty"`
|
||||
ScaleToZeroEnabled bool `json:"scale_to_zero_enabled,omitempty"`
|
||||
WorkloadSize string `json:"workload_size"`
|
||||
WorkloadType string `json:"workload_type,omitempty"`
|
||||
EnvironmentVars map[string]string `json:"environment_vars,omitempty"`
|
||||
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
|
||||
MaxProvisionedThroughput int `json:"max_provisioned_throughput,omitempty"`
|
||||
MinProvisionedThroughput int `json:"min_provisioned_throughput,omitempty"`
|
||||
ModelName string `json:"model_name"`
|
||||
ModelVersion string `json:"model_version"`
|
||||
Name string `json:"name,omitempty"`
|
||||
ScaleToZeroEnabled bool `json:"scale_to_zero_enabled,omitempty"`
|
||||
WorkloadSize string `json:"workload_size,omitempty"`
|
||||
WorkloadType string `json:"workload_type,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceModelServingConfigTrafficConfigRoutes struct {
|
||||
|
|
|
@ -18,20 +18,27 @@ type ResourceShareObject struct {
|
|||
AddedBy string `json:"added_by,omitempty"`
|
||||
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
DataObjectType string `json:"data_object_type"`
|
||||
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
||||
Name string `json:"name"`
|
||||
SharedAs string `json:"shared_as,omitempty"`
|
||||
StartVersion int `json:"start_version,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
StringSharedAs string `json:"string_shared_as,omitempty"`
|
||||
Partition []ResourceShareObjectPartition `json:"partition,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceShare struct {
|
||||
CreatedAt int `json:"created_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Owner string `json:"owner,omitempty"`
|
||||
Object []ResourceShareObject `json:"object,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
CreatedAt int `json:"created_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Owner string `json:"owner,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"`
|
||||
Object []ResourceShareObject `json:"object,omitempty"`
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ type ResourceSqlTable struct {
|
|||
ClusterKeys []string `json:"cluster_keys,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
DataSourceFormat string `json:"data_source_format,omitempty"`
|
||||
EffectiveProperties map[string]string `json:"effective_properties,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Options map[string]string `json:"options,omitempty"`
|
||||
|
|
|
@ -21,7 +21,7 @@ type Root struct {
|
|||
|
||||
const ProviderHost = "registry.terraform.io"
|
||||
const ProviderSource = "databricks/databricks"
|
||||
const ProviderVersion = "1.50.0"
|
||||
const ProviderVersion = "1.52.0"
|
||||
|
||||
func NewRoot() *Root {
|
||||
return &Root{
|
||||
|
|
Loading…
Reference in New Issue