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 {
|
func Run(ctx context.Context, schema *tfjson.ProviderSchema, path string) error {
|
||||||
// Generate types for resources.
|
// Generate types for resources
|
||||||
var resources []*namedBlock
|
var resources []*namedBlock
|
||||||
for _, k := range sortKeys(schema.ResourceSchemas) {
|
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]
|
v := schema.ResourceSchemas[k]
|
||||||
b := &namedBlock{
|
b := &namedBlock{
|
||||||
filePattern: "resource_%s.go",
|
filePattern: "resource_%s.go",
|
||||||
|
@ -71,6 +77,12 @@ func Run(ctx context.Context, schema *tfjson.ProviderSchema, path string) error
|
||||||
// Generate types for data sources.
|
// Generate types for data sources.
|
||||||
var dataSources []*namedBlock
|
var dataSources []*namedBlock
|
||||||
for _, k := range sortKeys(schema.DataSourceSchemas) {
|
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]
|
v := schema.DataSourceSchemas[k]
|
||||||
b := &namedBlock{
|
b := &namedBlock{
|
||||||
filePattern: "data_source_%s.go",
|
filePattern: "data_source_%s.go",
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
package schema
|
package schema
|
||||||
|
|
||||||
const ProviderVersion = "1.50.0"
|
const ProviderVersion = "1.52.0"
|
||||||
|
|
|
@ -2,8 +2,16 @@
|
||||||
|
|
||||||
package schema
|
package schema
|
||||||
|
|
||||||
type DataSourceClusters struct {
|
type DataSourceClustersFilterBy struct {
|
||||||
ClusterNameContains string `json:"cluster_name_contains,omitempty"`
|
ClusterSources []string `json:"cluster_sources,omitempty"`
|
||||||
Id string `json:"id,omitempty"`
|
ClusterStates []string `json:"cluster_states,omitempty"`
|
||||||
Ids []string `json:"ids,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"`
|
CreatedBy string `json:"created_by,omitempty"`
|
||||||
CredentialId string `json:"credential_id,omitempty"`
|
CredentialId string `json:"credential_id,omitempty"`
|
||||||
CredentialName string `json:"credential_name,omitempty"`
|
CredentialName string `json:"credential_name,omitempty"`
|
||||||
|
Fallback bool `json:"fallback,omitempty"`
|
||||||
IsolationMode string `json:"isolation_mode,omitempty"`
|
IsolationMode string `json:"isolation_mode,omitempty"`
|
||||||
MetastoreId string `json:"metastore_id,omitempty"`
|
MetastoreId string `json:"metastore_id,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
|
@ -18,12 +18,14 @@ type DataSourceShareObject struct {
|
||||||
AddedBy string `json:"added_by,omitempty"`
|
AddedBy string `json:"added_by,omitempty"`
|
||||||
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
||||||
Comment string `json:"comment,omitempty"`
|
Comment string `json:"comment,omitempty"`
|
||||||
|
Content string `json:"content,omitempty"`
|
||||||
DataObjectType string `json:"data_object_type"`
|
DataObjectType string `json:"data_object_type"`
|
||||||
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
SharedAs string `json:"shared_as,omitempty"`
|
SharedAs string `json:"shared_as,omitempty"`
|
||||||
StartVersion int `json:"start_version,omitempty"`
|
StartVersion int `json:"start_version,omitempty"`
|
||||||
Status string `json:"status,omitempty"`
|
Status string `json:"status,omitempty"`
|
||||||
|
StringSharedAs string `json:"string_shared_as,omitempty"`
|
||||||
Partition []DataSourceShareObjectPartition `json:"partition,omitempty"`
|
Partition []DataSourceShareObjectPartition `json:"partition,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,14 @@
|
||||||
|
|
||||||
package schema
|
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 {
|
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedScheduleWindowStartTime struct {
|
||||||
Hours int `json:"hours,omitempty"`
|
Hours int `json:"hours"`
|
||||||
Minutes int `json:"minutes,omitempty"`
|
Minutes int `json:"minutes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedSchedule struct {
|
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedSchedule struct {
|
||||||
DayOfWeek string `json:"day_of_week,omitempty"`
|
DayOfWeek string `json:"day_of_week"`
|
||||||
Frequency string `json:"frequency,omitempty"`
|
Frequency string `json:"frequency"`
|
||||||
WindowStartTime *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedScheduleWindowStartTime `json:"window_start_time,omitempty"`
|
WindowStartTime *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindowWeekDayBasedScheduleWindowStartTime `json:"window_start_time,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +19,9 @@ type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspa
|
||||||
|
|
||||||
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspace struct {
|
type ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspace struct {
|
||||||
CanToggle bool `json:"can_toggle,omitempty"`
|
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"`
|
RestartEvenIfNoUpdatesAvailable bool `json:"restart_even_if_no_updates_available,omitempty"`
|
||||||
EnablementDetails *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceEnablementDetails `json:"enablement_details,omitempty"`
|
|
||||||
MaintenanceWindow *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindow `json:"maintenance_window,omitempty"`
|
MaintenanceWindow *ResourceAutomaticClusterUpdateWorkspaceSettingAutomaticClusterUpdateWorkspaceMaintenanceWindow `json:"maintenance_window,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,7 @@ type ResourceCluster struct {
|
||||||
IdempotencyToken string `json:"idempotency_token,omitempty"`
|
IdempotencyToken string `json:"idempotency_token,omitempty"`
|
||||||
InstancePoolId string `json:"instance_pool_id,omitempty"`
|
InstancePoolId string `json:"instance_pool_id,omitempty"`
|
||||||
IsPinned bool `json:"is_pinned,omitempty"`
|
IsPinned bool `json:"is_pinned,omitempty"`
|
||||||
|
NoWait bool `json:"no_wait,omitempty"`
|
||||||
NodeTypeId string `json:"node_type_id,omitempty"`
|
NodeTypeId string `json:"node_type_id,omitempty"`
|
||||||
NumWorkers int `json:"num_workers,omitempty"`
|
NumWorkers int `json:"num_workers,omitempty"`
|
||||||
PolicyId string `json:"policy_id,omitempty"`
|
PolicyId string `json:"policy_id,omitempty"`
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
package schema
|
package schema
|
||||||
|
|
||||||
type ResourceComplianceSecurityProfileWorkspaceSettingComplianceSecurityProfileWorkspace struct {
|
type ResourceComplianceSecurityProfileWorkspaceSettingComplianceSecurityProfileWorkspace struct {
|
||||||
ComplianceStandards []string `json:"compliance_standards,omitempty"`
|
ComplianceStandards []string `json:"compliance_standards"`
|
||||||
IsEnabled bool `json:"is_enabled,omitempty"`
|
IsEnabled bool `json:"is_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceComplianceSecurityProfileWorkspaceSetting struct {
|
type ResourceComplianceSecurityProfileWorkspaceSetting struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
package schema
|
package schema
|
||||||
|
|
||||||
type ResourceEnhancedSecurityMonitoringWorkspaceSettingEnhancedSecurityMonitoringWorkspace struct {
|
type ResourceEnhancedSecurityMonitoringWorkspaceSettingEnhancedSecurityMonitoringWorkspace struct {
|
||||||
IsEnabled bool `json:"is_enabled,omitempty"`
|
IsEnabled bool `json:"is_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceEnhancedSecurityMonitoringWorkspaceSetting struct {
|
type ResourceEnhancedSecurityMonitoringWorkspaceSetting struct {
|
||||||
|
|
|
@ -95,14 +95,16 @@ type ResourceModelServingConfigServedEntities struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceModelServingConfigServedModels struct {
|
type ResourceModelServingConfigServedModels struct {
|
||||||
EnvironmentVars map[string]string `json:"environment_vars,omitempty"`
|
EnvironmentVars map[string]string `json:"environment_vars,omitempty"`
|
||||||
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
|
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
|
||||||
ModelName string `json:"model_name"`
|
MaxProvisionedThroughput int `json:"max_provisioned_throughput,omitempty"`
|
||||||
ModelVersion string `json:"model_version"`
|
MinProvisionedThroughput int `json:"min_provisioned_throughput,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
ModelName string `json:"model_name"`
|
||||||
ScaleToZeroEnabled bool `json:"scale_to_zero_enabled,omitempty"`
|
ModelVersion string `json:"model_version"`
|
||||||
WorkloadSize string `json:"workload_size"`
|
Name string `json:"name,omitempty"`
|
||||||
WorkloadType string `json:"workload_type,omitempty"`
|
ScaleToZeroEnabled bool `json:"scale_to_zero_enabled,omitempty"`
|
||||||
|
WorkloadSize string `json:"workload_size,omitempty"`
|
||||||
|
WorkloadType string `json:"workload_type,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceModelServingConfigTrafficConfigRoutes struct {
|
type ResourceModelServingConfigTrafficConfigRoutes struct {
|
||||||
|
|
|
@ -18,20 +18,27 @@ type ResourceShareObject struct {
|
||||||
AddedBy string `json:"added_by,omitempty"`
|
AddedBy string `json:"added_by,omitempty"`
|
||||||
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
CdfEnabled bool `json:"cdf_enabled,omitempty"`
|
||||||
Comment string `json:"comment,omitempty"`
|
Comment string `json:"comment,omitempty"`
|
||||||
|
Content string `json:"content,omitempty"`
|
||||||
DataObjectType string `json:"data_object_type"`
|
DataObjectType string `json:"data_object_type"`
|
||||||
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
HistoryDataSharingStatus string `json:"history_data_sharing_status,omitempty"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
SharedAs string `json:"shared_as,omitempty"`
|
SharedAs string `json:"shared_as,omitempty"`
|
||||||
StartVersion int `json:"start_version,omitempty"`
|
StartVersion int `json:"start_version,omitempty"`
|
||||||
Status string `json:"status,omitempty"`
|
Status string `json:"status,omitempty"`
|
||||||
|
StringSharedAs string `json:"string_shared_as,omitempty"`
|
||||||
Partition []ResourceShareObjectPartition `json:"partition,omitempty"`
|
Partition []ResourceShareObjectPartition `json:"partition,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceShare struct {
|
type ResourceShare struct {
|
||||||
CreatedAt int `json:"created_at,omitempty"`
|
Comment string `json:"comment,omitempty"`
|
||||||
CreatedBy string `json:"created_by,omitempty"`
|
CreatedAt int `json:"created_at,omitempty"`
|
||||||
Id string `json:"id,omitempty"`
|
CreatedBy string `json:"created_by,omitempty"`
|
||||||
Name string `json:"name"`
|
Id string `json:"id,omitempty"`
|
||||||
Owner string `json:"owner,omitempty"`
|
Name string `json:"name"`
|
||||||
Object []ResourceShareObject `json:"object,omitempty"`
|
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"`
|
ClusterKeys []string `json:"cluster_keys,omitempty"`
|
||||||
Comment string `json:"comment,omitempty"`
|
Comment string `json:"comment,omitempty"`
|
||||||
DataSourceFormat string `json:"data_source_format,omitempty"`
|
DataSourceFormat string `json:"data_source_format,omitempty"`
|
||||||
|
EffectiveProperties map[string]string `json:"effective_properties,omitempty"`
|
||||||
Id string `json:"id,omitempty"`
|
Id string `json:"id,omitempty"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Options map[string]string `json:"options,omitempty"`
|
Options map[string]string `json:"options,omitempty"`
|
||||||
|
|
|
@ -21,7 +21,7 @@ type Root struct {
|
||||||
|
|
||||||
const ProviderHost = "registry.terraform.io"
|
const ProviderHost = "registry.terraform.io"
|
||||||
const ProviderSource = "databricks/databricks"
|
const ProviderSource = "databricks/databricks"
|
||||||
const ProviderVersion = "1.50.0"
|
const ProviderVersion = "1.52.0"
|
||||||
|
|
||||||
func NewRoot() *Root {
|
func NewRoot() *Root {
|
||||||
return &Root{
|
return &Root{
|
||||||
|
|
Loading…
Reference in New Issue