From e1474a38f9473391ee7ff2c3d1b4a10ed99f21cf Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 17 Jul 2024 10:49:19 +0200 Subject: [PATCH] Upgrade TF provider to 1.48.3 (#1600) ## Changes This includes a fix for using periodic triggers. ## Tests Manually confirmed this works with https://github.com/databricks/bundle-examples/pull/32. --- bundle/internal/tf/codegen/schema/version.go | 2 +- bundle/internal/tf/schema/config.go | 62 ++++++++++--------- bundle/internal/tf/schema/data_source_job.go | 6 ++ .../tf/schema/resource_external_location.go | 1 + .../schema/resource_metastore_data_access.go | 1 + .../tf/schema/resource_storage_credential.go | 1 + bundle/internal/tf/schema/root.go | 2 +- 7 files changed, 43 insertions(+), 32 deletions(-) diff --git a/bundle/internal/tf/codegen/schema/version.go b/bundle/internal/tf/codegen/schema/version.go index a99f15a4..63a4b1b7 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.48.0" +const ProviderVersion = "1.48.3" diff --git a/bundle/internal/tf/schema/config.go b/bundle/internal/tf/schema/config.go index a2de987e..e807cdc5 100644 --- a/bundle/internal/tf/schema/config.go +++ b/bundle/internal/tf/schema/config.go @@ -3,34 +3,36 @@ package schema type Config struct { - AccountId string `json:"account_id,omitempty"` - AuthType string `json:"auth_type,omitempty"` - AzureClientId string `json:"azure_client_id,omitempty"` - AzureClientSecret string `json:"azure_client_secret,omitempty"` - AzureEnvironment string `json:"azure_environment,omitempty"` - AzureLoginAppId string `json:"azure_login_app_id,omitempty"` - AzureTenantId string `json:"azure_tenant_id,omitempty"` - AzureUseMsi bool `json:"azure_use_msi,omitempty"` - AzureWorkspaceResourceId string `json:"azure_workspace_resource_id,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - ClusterId string `json:"cluster_id,omitempty"` - ConfigFile string `json:"config_file,omitempty"` - DatabricksCliPath string `json:"databricks_cli_path,omitempty"` - DebugHeaders bool `json:"debug_headers,omitempty"` - DebugTruncateBytes int `json:"debug_truncate_bytes,omitempty"` - GoogleCredentials string `json:"google_credentials,omitempty"` - GoogleServiceAccount string `json:"google_service_account,omitempty"` - Host string `json:"host,omitempty"` - HttpTimeoutSeconds int `json:"http_timeout_seconds,omitempty"` - MetadataServiceUrl string `json:"metadata_service_url,omitempty"` - Password string `json:"password,omitempty"` - 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"` - WarehouseId string `json:"warehouse_id,omitempty"` + AccountId string `json:"account_id,omitempty"` + ActionsIdTokenRequestToken string `json:"actions_id_token_request_token,omitempty"` + ActionsIdTokenRequestUrl string `json:"actions_id_token_request_url,omitempty"` + AuthType string `json:"auth_type,omitempty"` + AzureClientId string `json:"azure_client_id,omitempty"` + AzureClientSecret string `json:"azure_client_secret,omitempty"` + AzureEnvironment string `json:"azure_environment,omitempty"` + AzureLoginAppId string `json:"azure_login_app_id,omitempty"` + AzureTenantId string `json:"azure_tenant_id,omitempty"` + AzureUseMsi bool `json:"azure_use_msi,omitempty"` + AzureWorkspaceResourceId string `json:"azure_workspace_resource_id,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + ClusterId string `json:"cluster_id,omitempty"` + ConfigFile string `json:"config_file,omitempty"` + DatabricksCliPath string `json:"databricks_cli_path,omitempty"` + DebugHeaders bool `json:"debug_headers,omitempty"` + DebugTruncateBytes int `json:"debug_truncate_bytes,omitempty"` + GoogleCredentials string `json:"google_credentials,omitempty"` + GoogleServiceAccount string `json:"google_service_account,omitempty"` + Host string `json:"host,omitempty"` + HttpTimeoutSeconds int `json:"http_timeout_seconds,omitempty"` + MetadataServiceUrl string `json:"metadata_service_url,omitempty"` + Password string `json:"password,omitempty"` + 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"` + WarehouseId string `json:"warehouse_id,omitempty"` } diff --git a/bundle/internal/tf/schema/data_source_job.go b/bundle/internal/tf/schema/data_source_job.go index 727848ce..91806d67 100644 --- a/bundle/internal/tf/schema/data_source_job.go +++ b/bundle/internal/tf/schema/data_source_job.go @@ -1224,6 +1224,11 @@ type DataSourceJobJobSettingsSettingsTriggerFileArrival struct { WaitAfterLastChangeSeconds int `json:"wait_after_last_change_seconds,omitempty"` } +type DataSourceJobJobSettingsSettingsTriggerPeriodic struct { + Interval int `json:"interval"` + Unit string `json:"unit"` +} + type DataSourceJobJobSettingsSettingsTriggerTableUpdate struct { Condition string `json:"condition,omitempty"` MinTimeBetweenTriggersSeconds int `json:"min_time_between_triggers_seconds,omitempty"` @@ -1234,6 +1239,7 @@ type DataSourceJobJobSettingsSettingsTriggerTableUpdate struct { type DataSourceJobJobSettingsSettingsTrigger struct { PauseStatus string `json:"pause_status,omitempty"` FileArrival *DataSourceJobJobSettingsSettingsTriggerFileArrival `json:"file_arrival,omitempty"` + Periodic *DataSourceJobJobSettingsSettingsTriggerPeriodic `json:"periodic,omitempty"` TableUpdate *DataSourceJobJobSettingsSettingsTriggerTableUpdate `json:"table_update,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_external_location.go b/bundle/internal/tf/schema/resource_external_location.go index af64c677..da28271b 100644 --- a/bundle/internal/tf/schema/resource_external_location.go +++ b/bundle/internal/tf/schema/resource_external_location.go @@ -18,6 +18,7 @@ type ResourceExternalLocation struct { ForceDestroy bool `json:"force_destroy,omitempty"` ForceUpdate bool `json:"force_update,omitempty"` Id string `json:"id,omitempty"` + IsolationMode string `json:"isolation_mode,omitempty"` MetastoreId string `json:"metastore_id,omitempty"` Name string `json:"name"` Owner string `json:"owner,omitempty"` diff --git a/bundle/internal/tf/schema/resource_metastore_data_access.go b/bundle/internal/tf/schema/resource_metastore_data_access.go index 15573005..2e2ff4eb 100644 --- a/bundle/internal/tf/schema/resource_metastore_data_access.go +++ b/bundle/internal/tf/schema/resource_metastore_data_access.go @@ -37,6 +37,7 @@ type ResourceMetastoreDataAccess struct { ForceUpdate bool `json:"force_update,omitempty"` Id string `json:"id,omitempty"` IsDefault bool `json:"is_default,omitempty"` + IsolationMode string `json:"isolation_mode,omitempty"` MetastoreId string `json:"metastore_id,omitempty"` Name string `json:"name"` Owner string `json:"owner,omitempty"` diff --git a/bundle/internal/tf/schema/resource_storage_credential.go b/bundle/internal/tf/schema/resource_storage_credential.go index b565a5c7..1c62cf8d 100644 --- a/bundle/internal/tf/schema/resource_storage_credential.go +++ b/bundle/internal/tf/schema/resource_storage_credential.go @@ -36,6 +36,7 @@ type ResourceStorageCredential struct { ForceDestroy bool `json:"force_destroy,omitempty"` ForceUpdate bool `json:"force_update,omitempty"` Id string `json:"id,omitempty"` + IsolationMode string `json:"isolation_mode,omitempty"` MetastoreId string `json:"metastore_id,omitempty"` Name string `json:"name"` Owner string `json:"owner,omitempty"` diff --git a/bundle/internal/tf/schema/root.go b/bundle/internal/tf/schema/root.go index 39db3ea2..a79e998c 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.48.0" +const ProviderVersion = "1.48.3" func NewRoot() *Root { return &Root{