Skip to content

Commit

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

This includes a fix for library order not being respected.

## Tests

Manually confirmed the fix works in
databricks/bundle-examples#29.
  • Loading branch information
pietern authored Jun 26, 2024
1 parent 482d83c commit ce5a3f2
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 6 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.47.0"
const ProviderVersion = "1.48.0"
1 change: 1 addition & 0 deletions bundle/internal/tf/schema/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Config struct {
Profile string `json:"profile,omitempty"`
RateLimit int `json:"rate_limit,omitempty"`
RetryTimeoutSeconds int `json:"retry_timeout_seconds,omitempty"`
ServerlessComputeId string `json:"serverless_compute_id,omitempty"`
SkipVerify bool `json:"skip_verify,omitempty"`
Token string `json:"token,omitempty"`
Username string `json:"username,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions bundle/internal/tf/schema/data_source_external_location.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
IsolationMode string `json:"isolation_mode,omitempty"`
MetastoreId string `json:"metastore_id,omitempty"`
Name string `json:"name,omitempty"`
Owner string `json:"owner,omitempty"`
Expand Down
18 changes: 18 additions & 0 deletions bundle/internal/tf/schema/data_source_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type DataSourceJobJobSettingsSettingsEmailNotifications struct {
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -500,6 +501,7 @@ type DataSourceJobJobSettingsSettingsTaskEmailNotifications struct {
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -529,6 +531,7 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskEmailNotifications struc
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -824,6 +827,10 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnSt
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -832,6 +839,7 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotifications str
OnDurationWarningThresholdExceeded []DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []DataSourceJobJobSettingsSettingsTaskForEachTaskTaskWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -1163,6 +1171,10 @@ type DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnStart struct {
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -1171,6 +1183,7 @@ type DataSourceJobJobSettingsSettingsTaskWebhookNotifications struct {
OnDurationWarningThresholdExceeded []DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []DataSourceJobJobSettingsSettingsTaskWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -1236,6 +1249,10 @@ type DataSourceJobJobSettingsSettingsWebhookNotificationsOnStart struct {
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type DataSourceJobJobSettingsSettingsWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -1244,6 +1261,7 @@ type DataSourceJobJobSettingsSettingsWebhookNotifications struct {
OnDurationWarningThresholdExceeded []DataSourceJobJobSettingsSettingsWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []DataSourceJobJobSettingsSettingsWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []DataSourceJobJobSettingsSettingsWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []DataSourceJobJobSettingsSettingsWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []DataSourceJobJobSettingsSettingsWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type DataSourceStorageCredentialStorageCredentialInfo struct {
CreatedAt int `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Id string `json:"id,omitempty"`
IsolationMode string `json:"isolation_mode,omitempty"`
MetastoreId string `json:"metastore_id,omitempty"`
Name string `json:"name,omitempty"`
Owner string `json:"owner,omitempty"`
Expand Down
24 changes: 24 additions & 0 deletions bundle/internal/tf/schema/resource_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type ResourceJobEmailNotifications struct {
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -573,6 +574,7 @@ type ResourceJobTaskEmailNotifications struct {
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -602,6 +604,7 @@ type ResourceJobTaskForEachTaskTaskEmailNotifications struct {
OnDurationWarningThresholdExceeded []string `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []string `json:"on_failure,omitempty"`
OnStart []string `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []string `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []string `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -943,6 +946,10 @@ type ResourceJobTaskForEachTaskTaskWebhookNotificationsOnStart struct {
Id string `json:"id"`
}

type ResourceJobTaskForEachTaskTaskWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type ResourceJobTaskForEachTaskTaskWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -951,6 +958,7 @@ type ResourceJobTaskForEachTaskTaskWebhookNotifications struct {
OnDurationWarningThresholdExceeded []ResourceJobTaskForEachTaskTaskWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []ResourceJobTaskForEachTaskTaskWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []ResourceJobTaskForEachTaskTaskWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []ResourceJobTaskForEachTaskTaskWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []ResourceJobTaskForEachTaskTaskWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -1329,6 +1337,10 @@ type ResourceJobTaskWebhookNotificationsOnStart struct {
Id string `json:"id"`
}

type ResourceJobTaskWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type ResourceJobTaskWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -1337,6 +1349,7 @@ type ResourceJobTaskWebhookNotifications struct {
OnDurationWarningThresholdExceeded []ResourceJobTaskWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []ResourceJobTaskWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []ResourceJobTaskWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []ResourceJobTaskWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []ResourceJobTaskWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down Expand Up @@ -1378,6 +1391,11 @@ type ResourceJobTriggerFileArrival struct {
WaitAfterLastChangeSeconds int `json:"wait_after_last_change_seconds,omitempty"`
}

type ResourceJobTriggerPeriodic struct {
Interval int `json:"interval"`
Unit string `json:"unit"`
}

type ResourceJobTriggerTable struct {
Condition string `json:"condition,omitempty"`
MinTimeBetweenTriggersSeconds int `json:"min_time_between_triggers_seconds,omitempty"`
Expand All @@ -1395,6 +1413,7 @@ type ResourceJobTriggerTableUpdate struct {
type ResourceJobTrigger struct {
PauseStatus string `json:"pause_status,omitempty"`
FileArrival *ResourceJobTriggerFileArrival `json:"file_arrival,omitempty"`
Periodic *ResourceJobTriggerPeriodic `json:"periodic,omitempty"`
Table *ResourceJobTriggerTable `json:"table,omitempty"`
TableUpdate *ResourceJobTriggerTableUpdate `json:"table_update,omitempty"`
}
Expand All @@ -1411,6 +1430,10 @@ type ResourceJobWebhookNotificationsOnStart struct {
Id string `json:"id"`
}

type ResourceJobWebhookNotificationsOnStreamingBacklogExceeded struct {
Id string `json:"id"`
}

type ResourceJobWebhookNotificationsOnSuccess struct {
Id string `json:"id"`
}
Expand All @@ -1419,6 +1442,7 @@ type ResourceJobWebhookNotifications struct {
OnDurationWarningThresholdExceeded []ResourceJobWebhookNotificationsOnDurationWarningThresholdExceeded `json:"on_duration_warning_threshold_exceeded,omitempty"`
OnFailure []ResourceJobWebhookNotificationsOnFailure `json:"on_failure,omitempty"`
OnStart []ResourceJobWebhookNotificationsOnStart `json:"on_start,omitempty"`
OnStreamingBacklogExceeded []ResourceJobWebhookNotificationsOnStreamingBacklogExceeded `json:"on_streaming_backlog_exceeded,omitempty"`
OnSuccess []ResourceJobWebhookNotificationsOnSuccess `json:"on_success,omitempty"`
}

Expand Down
9 changes: 5 additions & 4 deletions bundle/internal/tf/schema/resource_online_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ type ResourceOnlineTableSpec struct {
}

type ResourceOnlineTable struct {
Id string `json:"id,omitempty"`
Name string `json:"name"`
Status []any `json:"status,omitempty"`
Spec *ResourceOnlineTableSpec `json:"spec,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name"`
Status []any `json:"status,omitempty"`
TableServingUrl string `json:"table_serving_url,omitempty"`
Spec *ResourceOnlineTableSpec `json:"spec,omitempty"`
}
2 changes: 1 addition & 1 deletion bundle/internal/tf/schema/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Root struct {

const ProviderHost = "registry.terraform.io"
const ProviderSource = "databricks/databricks"
const ProviderVersion = "1.47.0"
const ProviderVersion = "1.48.0"

func NewRoot() *Root {
return &Root{
Expand Down

0 comments on commit ce5a3f2

Please sign in to comment.