Upgrade TF provider to 1.50.0 (#1681)

## Changes

See
https://github.com/databricks/terraform-provider-databricks/pull/3900

## Tests

* Manually test on a bundle with a pipeline and a schema
* Integration tests pass
This commit is contained in:
Pieter Noordhuis 2024-08-15 14:43:39 +02:00 committed by GitHub
parent 7aaaee2512
commit 6b3d33a846
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 234 additions and 57 deletions

View File

@ -1,3 +1,3 @@
package schema
const ProviderVersion = "1.49.1"
const ProviderVersion = "1.50.0"

View File

@ -10,4 +10,5 @@ type DataSourceNotebook struct {
ObjectId int `json:"object_id,omitempty"`
ObjectType string `json:"object_type,omitempty"`
Path string `json:"path"`
WorkspacePath string `json:"workspace_path,omitempty"`
}

View File

@ -4,6 +4,7 @@ package schema
type DataSourceUser struct {
AclPrincipalId string `json:"acl_principal_id,omitempty"`
Active bool `json:"active,omitempty"`
Alphanumeric string `json:"alphanumeric,omitempty"`
ApplicationId string `json:"application_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`

View File

@ -33,7 +33,7 @@ type ResourceClusterPolicy struct {
Description string `json:"description,omitempty"`
Id string `json:"id,omitempty"`
MaxClustersPerUser int `json:"max_clusters_per_user,omitempty"`
Name string `json:"name"`
Name string `json:"name,omitempty"`
PolicyFamilyDefinitionOverrides string `json:"policy_family_definition_overrides,omitempty"`
PolicyFamilyId string `json:"policy_family_id,omitempty"`
PolicyId string `json:"policy_id,omitempty"`

View File

@ -20,6 +20,12 @@ type ResourceMetastoreDataAccessAzureServicePrincipal struct {
DirectoryId string `json:"directory_id"`
}
type ResourceMetastoreDataAccessCloudflareApiToken struct {
AccessKeyId string `json:"access_key_id"`
AccountId string `json:"account_id"`
SecretAccessKey string `json:"secret_access_key"`
}
type ResourceMetastoreDataAccessDatabricksGcpServiceAccount struct {
CredentialId string `json:"credential_id,omitempty"`
Email string `json:"email,omitempty"`
@ -46,6 +52,7 @@ type ResourceMetastoreDataAccess struct {
AwsIamRole *ResourceMetastoreDataAccessAwsIamRole `json:"aws_iam_role,omitempty"`
AzureManagedIdentity *ResourceMetastoreDataAccessAzureManagedIdentity `json:"azure_managed_identity,omitempty"`
AzureServicePrincipal *ResourceMetastoreDataAccessAzureServicePrincipal `json:"azure_service_principal,omitempty"`
CloudflareApiToken *ResourceMetastoreDataAccessCloudflareApiToken `json:"cloudflare_api_token,omitempty"`
DatabricksGcpServiceAccount *ResourceMetastoreDataAccessDatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
GcpServiceAccountKey *ResourceMetastoreDataAccessGcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
}

View File

@ -10,35 +10,51 @@ type ResourceModelServingConfigAutoCaptureConfig struct {
}
type ResourceModelServingConfigServedEntitiesExternalModelAi21LabsConfig struct {
Ai21LabsApiKey string `json:"ai21labs_api_key"`
Ai21LabsApiKey string `json:"ai21labs_api_key,omitempty"`
Ai21LabsApiKeyPlaintext string `json:"ai21labs_api_key_plaintext,omitempty"`
}
type ResourceModelServingConfigServedEntitiesExternalModelAmazonBedrockConfig struct {
AwsAccessKeyId string `json:"aws_access_key_id"`
AwsAccessKeyId string `json:"aws_access_key_id,omitempty"`
AwsAccessKeyIdPlaintext string `json:"aws_access_key_id_plaintext,omitempty"`
AwsRegion string `json:"aws_region"`
AwsSecretAccessKey string `json:"aws_secret_access_key"`
AwsSecretAccessKey string `json:"aws_secret_access_key,omitempty"`
AwsSecretAccessKeyPlaintext string `json:"aws_secret_access_key_plaintext,omitempty"`
BedrockProvider string `json:"bedrock_provider"`
}
type ResourceModelServingConfigServedEntitiesExternalModelAnthropicConfig struct {
AnthropicApiKey string `json:"anthropic_api_key"`
AnthropicApiKey string `json:"anthropic_api_key,omitempty"`
AnthropicApiKeyPlaintext string `json:"anthropic_api_key_plaintext,omitempty"`
}
type ResourceModelServingConfigServedEntitiesExternalModelCohereConfig struct {
CohereApiKey string `json:"cohere_api_key"`
CohereApiBase string `json:"cohere_api_base,omitempty"`
CohereApiKey string `json:"cohere_api_key,omitempty"`
CohereApiKeyPlaintext string `json:"cohere_api_key_plaintext,omitempty"`
}
type ResourceModelServingConfigServedEntitiesExternalModelDatabricksModelServingConfig struct {
DatabricksApiToken string `json:"databricks_api_token"`
DatabricksApiToken string `json:"databricks_api_token,omitempty"`
DatabricksApiTokenPlaintext string `json:"databricks_api_token_plaintext,omitempty"`
DatabricksWorkspaceUrl string `json:"databricks_workspace_url"`
}
type ResourceModelServingConfigServedEntitiesExternalModelGoogleCloudVertexAiConfig struct {
PrivateKey string `json:"private_key,omitempty"`
PrivateKeyPlaintext string `json:"private_key_plaintext,omitempty"`
ProjectId string `json:"project_id,omitempty"`
Region string `json:"region,omitempty"`
}
type ResourceModelServingConfigServedEntitiesExternalModelOpenaiConfig struct {
MicrosoftEntraClientId string `json:"microsoft_entra_client_id,omitempty"`
MicrosoftEntraClientSecret string `json:"microsoft_entra_client_secret,omitempty"`
MicrosoftEntraClientSecretPlaintext string `json:"microsoft_entra_client_secret_plaintext,omitempty"`
MicrosoftEntraTenantId string `json:"microsoft_entra_tenant_id,omitempty"`
OpenaiApiBase string `json:"openai_api_base,omitempty"`
OpenaiApiKey string `json:"openai_api_key,omitempty"`
OpenaiApiKeyPlaintext string `json:"openai_api_key_plaintext,omitempty"`
OpenaiApiType string `json:"openai_api_type,omitempty"`
OpenaiApiVersion string `json:"openai_api_version,omitempty"`
OpenaiDeploymentName string `json:"openai_deployment_name,omitempty"`
@ -46,7 +62,8 @@ type ResourceModelServingConfigServedEntitiesExternalModelOpenaiConfig struct {
}
type ResourceModelServingConfigServedEntitiesExternalModelPalmConfig struct {
PalmApiKey string `json:"palm_api_key"`
PalmApiKey string `json:"palm_api_key,omitempty"`
PalmApiKeyPlaintext string `json:"palm_api_key_plaintext,omitempty"`
}
type ResourceModelServingConfigServedEntitiesExternalModel struct {
@ -58,6 +75,7 @@ type ResourceModelServingConfigServedEntitiesExternalModel struct {
AnthropicConfig *ResourceModelServingConfigServedEntitiesExternalModelAnthropicConfig `json:"anthropic_config,omitempty"`
CohereConfig *ResourceModelServingConfigServedEntitiesExternalModelCohereConfig `json:"cohere_config,omitempty"`
DatabricksModelServingConfig *ResourceModelServingConfigServedEntitiesExternalModelDatabricksModelServingConfig `json:"databricks_model_serving_config,omitempty"`
GoogleCloudVertexAiConfig *ResourceModelServingConfigServedEntitiesExternalModelGoogleCloudVertexAiConfig `json:"google_cloud_vertex_ai_config,omitempty"`
OpenaiConfig *ResourceModelServingConfigServedEntitiesExternalModelOpenaiConfig `json:"openai_config,omitempty"`
PalmConfig *ResourceModelServingConfigServedEntitiesExternalModelPalmConfig `json:"palm_config,omitempty"`
}

View File

@ -13,4 +13,5 @@ type ResourceNotebook struct {
Path string `json:"path"`
Source string `json:"source,omitempty"`
Url string `json:"url,omitempty"`
WorkspacePath string `json:"workspace_path,omitempty"`
}

View File

@ -0,0 +1,46 @@
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
package schema
type ResourceNotificationDestinationConfigEmail struct {
Addresses []string `json:"addresses,omitempty"`
}
type ResourceNotificationDestinationConfigGenericWebhook struct {
Password string `json:"password,omitempty"`
PasswordSet bool `json:"password_set,omitempty"`
Url string `json:"url,omitempty"`
UrlSet bool `json:"url_set,omitempty"`
Username string `json:"username,omitempty"`
UsernameSet bool `json:"username_set,omitempty"`
}
type ResourceNotificationDestinationConfigMicrosoftTeams struct {
Url string `json:"url,omitempty"`
UrlSet bool `json:"url_set,omitempty"`
}
type ResourceNotificationDestinationConfigPagerduty struct {
IntegrationKey string `json:"integration_key,omitempty"`
IntegrationKeySet bool `json:"integration_key_set,omitempty"`
}
type ResourceNotificationDestinationConfigSlack struct {
Url string `json:"url,omitempty"`
UrlSet bool `json:"url_set,omitempty"`
}
type ResourceNotificationDestinationConfig struct {
Email *ResourceNotificationDestinationConfigEmail `json:"email,omitempty"`
GenericWebhook *ResourceNotificationDestinationConfigGenericWebhook `json:"generic_webhook,omitempty"`
MicrosoftTeams *ResourceNotificationDestinationConfigMicrosoftTeams `json:"microsoft_teams,omitempty"`
Pagerduty *ResourceNotificationDestinationConfigPagerduty `json:"pagerduty,omitempty"`
Slack *ResourceNotificationDestinationConfigSlack `json:"slack,omitempty"`
}
type ResourceNotificationDestination struct {
DestinationType string `json:"destination_type,omitempty"`
DisplayName string `json:"display_name"`
Id string `json:"id,omitempty"`
Config *ResourceNotificationDestinationConfig `json:"config,omitempty"`
}

View File

@ -3,15 +3,17 @@
package schema
type ResourcePipelineClusterAutoscale struct {
MaxWorkers int `json:"max_workers,omitempty"`
MinWorkers int `json:"min_workers,omitempty"`
MaxWorkers int `json:"max_workers"`
MinWorkers int `json:"min_workers"`
Mode string `json:"mode,omitempty"`
}
type ResourcePipelineClusterAwsAttributes struct {
Availability string `json:"availability,omitempty"`
EbsVolumeCount int `json:"ebs_volume_count,omitempty"`
EbsVolumeIops int `json:"ebs_volume_iops,omitempty"`
EbsVolumeSize int `json:"ebs_volume_size,omitempty"`
EbsVolumeThroughput int `json:"ebs_volume_throughput,omitempty"`
EbsVolumeType string `json:"ebs_volume_type,omitempty"`
FirstOnDemand int `json:"first_on_demand,omitempty"`
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
@ -19,10 +21,16 @@ type ResourcePipelineClusterAwsAttributes struct {
ZoneId string `json:"zone_id,omitempty"`
}
type ResourcePipelineClusterAzureAttributesLogAnalyticsInfo struct {
LogAnalyticsPrimaryKey string `json:"log_analytics_primary_key,omitempty"`
LogAnalyticsWorkspaceId string `json:"log_analytics_workspace_id,omitempty"`
}
type ResourcePipelineClusterAzureAttributes struct {
Availability string `json:"availability,omitempty"`
FirstOnDemand int `json:"first_on_demand,omitempty"`
SpotBidMaxPrice int `json:"spot_bid_max_price,omitempty"`
LogAnalyticsInfo *ResourcePipelineClusterAzureAttributesLogAnalyticsInfo `json:"log_analytics_info,omitempty"`
}
type ResourcePipelineClusterClusterLogConfDbfs struct {
@ -127,8 +135,69 @@ type ResourcePipelineFilters struct {
Include []string `json:"include,omitempty"`
}
type ResourcePipelineGatewayDefinition struct {
ConnectionId string `json:"connection_id,omitempty"`
GatewayStorageCatalog string `json:"gateway_storage_catalog,omitempty"`
GatewayStorageName string `json:"gateway_storage_name,omitempty"`
GatewayStorageSchema string `json:"gateway_storage_schema,omitempty"`
}
type ResourcePipelineIngestionDefinitionObjectsSchemaTableConfiguration struct {
PrimaryKeys []string `json:"primary_keys,omitempty"`
SalesforceIncludeFormulaFields bool `json:"salesforce_include_formula_fields,omitempty"`
ScdType string `json:"scd_type,omitempty"`
}
type ResourcePipelineIngestionDefinitionObjectsSchema struct {
DestinationCatalog string `json:"destination_catalog,omitempty"`
DestinationSchema string `json:"destination_schema,omitempty"`
SourceCatalog string `json:"source_catalog,omitempty"`
SourceSchema string `json:"source_schema,omitempty"`
TableConfiguration *ResourcePipelineIngestionDefinitionObjectsSchemaTableConfiguration `json:"table_configuration,omitempty"`
}
type ResourcePipelineIngestionDefinitionObjectsTableTableConfiguration struct {
PrimaryKeys []string `json:"primary_keys,omitempty"`
SalesforceIncludeFormulaFields bool `json:"salesforce_include_formula_fields,omitempty"`
ScdType string `json:"scd_type,omitempty"`
}
type ResourcePipelineIngestionDefinitionObjectsTable struct {
DestinationCatalog string `json:"destination_catalog,omitempty"`
DestinationSchema string `json:"destination_schema,omitempty"`
DestinationTable string `json:"destination_table,omitempty"`
SourceCatalog string `json:"source_catalog,omitempty"`
SourceSchema string `json:"source_schema,omitempty"`
SourceTable string `json:"source_table,omitempty"`
TableConfiguration *ResourcePipelineIngestionDefinitionObjectsTableTableConfiguration `json:"table_configuration,omitempty"`
}
type ResourcePipelineIngestionDefinitionObjects struct {
Schema *ResourcePipelineIngestionDefinitionObjectsSchema `json:"schema,omitempty"`
Table *ResourcePipelineIngestionDefinitionObjectsTable `json:"table,omitempty"`
}
type ResourcePipelineIngestionDefinitionTableConfiguration struct {
PrimaryKeys []string `json:"primary_keys,omitempty"`
SalesforceIncludeFormulaFields bool `json:"salesforce_include_formula_fields,omitempty"`
ScdType string `json:"scd_type,omitempty"`
}
type ResourcePipelineIngestionDefinition struct {
ConnectionName string `json:"connection_name,omitempty"`
IngestionGatewayId string `json:"ingestion_gateway_id,omitempty"`
Objects []ResourcePipelineIngestionDefinitionObjects `json:"objects,omitempty"`
TableConfiguration *ResourcePipelineIngestionDefinitionTableConfiguration `json:"table_configuration,omitempty"`
}
type ResourcePipelineLatestUpdates struct {
CreationTime string `json:"creation_time,omitempty"`
State string `json:"state,omitempty"`
UpdateId string `json:"update_id,omitempty"`
}
type ResourcePipelineLibraryFile struct {
Path string `json:"path"`
Path string `json:"path,omitempty"`
}
type ResourcePipelineLibraryMaven struct {
@ -138,7 +207,7 @@ type ResourcePipelineLibraryMaven struct {
}
type ResourcePipelineLibraryNotebook struct {
Path string `json:"path"`
Path string `json:"path,omitempty"`
}
type ResourcePipelineLibrary struct {
@ -150,28 +219,53 @@ type ResourcePipelineLibrary struct {
}
type ResourcePipelineNotification struct {
Alerts []string `json:"alerts"`
EmailRecipients []string `json:"email_recipients"`
Alerts []string `json:"alerts,omitempty"`
EmailRecipients []string `json:"email_recipients,omitempty"`
}
type ResourcePipelineTriggerCron struct {
QuartzCronSchedule string `json:"quartz_cron_schedule,omitempty"`
TimezoneId string `json:"timezone_id,omitempty"`
}
type ResourcePipelineTriggerManual struct {
}
type ResourcePipelineTrigger struct {
Cron *ResourcePipelineTriggerCron `json:"cron,omitempty"`
Manual *ResourcePipelineTriggerManual `json:"manual,omitempty"`
}
type ResourcePipeline struct {
AllowDuplicateNames bool `json:"allow_duplicate_names,omitempty"`
Catalog string `json:"catalog,omitempty"`
Cause string `json:"cause,omitempty"`
Channel string `json:"channel,omitempty"`
ClusterId string `json:"cluster_id,omitempty"`
Configuration map[string]string `json:"configuration,omitempty"`
Continuous bool `json:"continuous,omitempty"`
CreatorUserName string `json:"creator_user_name,omitempty"`
Development bool `json:"development,omitempty"`
Edition string `json:"edition,omitempty"`
ExpectedLastModified int `json:"expected_last_modified,omitempty"`
Health string `json:"health,omitempty"`
Id string `json:"id,omitempty"`
LastModified int `json:"last_modified,omitempty"`
Name string `json:"name,omitempty"`
Photon bool `json:"photon,omitempty"`
RunAsUserName string `json:"run_as_user_name,omitempty"`
Serverless bool `json:"serverless,omitempty"`
State string `json:"state,omitempty"`
Storage string `json:"storage,omitempty"`
Target string `json:"target,omitempty"`
Url string `json:"url,omitempty"`
Cluster []ResourcePipelineCluster `json:"cluster,omitempty"`
Deployment *ResourcePipelineDeployment `json:"deployment,omitempty"`
Filters *ResourcePipelineFilters `json:"filters,omitempty"`
GatewayDefinition *ResourcePipelineGatewayDefinition `json:"gateway_definition,omitempty"`
IngestionDefinition *ResourcePipelineIngestionDefinition `json:"ingestion_definition,omitempty"`
LatestUpdates []ResourcePipelineLatestUpdates `json:"latest_updates,omitempty"`
Library []ResourcePipelineLibrary `json:"library,omitempty"`
Notification []ResourcePipelineNotification `json:"notification,omitempty"`
Trigger *ResourcePipelineTrigger `json:"trigger,omitempty"`
}

View File

@ -20,6 +20,12 @@ type ResourceStorageCredentialAzureServicePrincipal struct {
DirectoryId string `json:"directory_id"`
}
type ResourceStorageCredentialCloudflareApiToken struct {
AccessKeyId string `json:"access_key_id"`
AccountId string `json:"account_id"`
SecretAccessKey string `json:"secret_access_key"`
}
type ResourceStorageCredentialDatabricksGcpServiceAccount struct {
CredentialId string `json:"credential_id,omitempty"`
Email string `json:"email,omitempty"`
@ -46,6 +52,7 @@ type ResourceStorageCredential struct {
AwsIamRole *ResourceStorageCredentialAwsIamRole `json:"aws_iam_role,omitempty"`
AzureManagedIdentity *ResourceStorageCredentialAzureManagedIdentity `json:"azure_managed_identity,omitempty"`
AzureServicePrincipal *ResourceStorageCredentialAzureServicePrincipal `json:"azure_service_principal,omitempty"`
CloudflareApiToken *ResourceStorageCredentialCloudflareApiToken `json:"cloudflare_api_token,omitempty"`
DatabricksGcpServiceAccount *ResourceStorageCredentialDatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
GcpServiceAccountKey *ResourceStorageCredentialGcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
}

View File

@ -59,6 +59,7 @@ type Resources struct {
MwsVpcEndpoint map[string]any `json:"databricks_mws_vpc_endpoint,omitempty"`
MwsWorkspaces map[string]any `json:"databricks_mws_workspaces,omitempty"`
Notebook map[string]any `json:"databricks_notebook,omitempty"`
NotificationDestination map[string]any `json:"databricks_notification_destination,omitempty"`
OboToken map[string]any `json:"databricks_obo_token,omitempty"`
OnlineTable map[string]any `json:"databricks_online_table,omitempty"`
PermissionAssignment map[string]any `json:"databricks_permission_assignment,omitempty"`
@ -160,6 +161,7 @@ func NewResources() *Resources {
MwsVpcEndpoint: make(map[string]any),
MwsWorkspaces: make(map[string]any),
Notebook: make(map[string]any),
NotificationDestination: make(map[string]any),
OboToken: make(map[string]any),
OnlineTable: make(map[string]any),
PermissionAssignment: make(map[string]any),

View File

@ -21,7 +21,7 @@ type Root struct {
const ProviderHost = "registry.terraform.io"
const ProviderSource = "databricks/databricks"
const ProviderVersion = "1.49.1"
const ProviderVersion = "1.50.0"
func NewRoot() *Root {
return &Root{