mirror of https://github.com/databricks/cli.git
Bump Terraform provider to v1.29.0 (#926)
This PR: 1. Regenerates go structs using provider version 1.29 2. Adds QOL autogenerated diff labels for github 3. Adds a small SOP for doing the tf provider bump for go structs
This commit is contained in:
parent
6f22ae8696
commit
bb662fadbb
|
@ -83,3 +83,6 @@ cmd/workspace/warehouses/warehouses.go linguist-generated=true
|
|||
cmd/workspace/workspace-bindings/workspace-bindings.go linguist-generated=true
|
||||
cmd/workspace/workspace-conf/workspace-conf.go linguist-generated=true
|
||||
cmd/workspace/workspace/workspace.go linguist-generated=true
|
||||
|
||||
# Hide diff for Go structs generated from databricks terraform provider schema
|
||||
bundle/internal/tf/schema/*.go linguist-generated=true
|
||||
|
|
|
@ -13,3 +13,9 @@ Run with:
|
|||
```go
|
||||
go run .
|
||||
```
|
||||
|
||||
How to regenerate Go structs from an updated terraform provider?
|
||||
1. Bump version in ./schema/version.go
|
||||
2. Delete `./tmp` if it exists
|
||||
3. Run `go run .`
|
||||
4. Run `gofmt -s -w ../schema`
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package schema
|
||||
|
||||
const ProviderVersion = "1.28.0"
|
||||
const ProviderVersion = "1.29.0"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
package schema
|
||||
|
||||
type Providers struct {
|
||||
|
|
|
@ -24,6 +24,11 @@ type DataSourceJobJobSettingsSettingsDbtTask struct {
|
|||
WarehouseId string `json:"warehouse_id,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceJobJobSettingsSettingsDeployment struct {
|
||||
Kind string `json:"kind"`
|
||||
MetadataFilePath string `json:"metadata_file_path,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceJobJobSettingsSettingsEmailNotifications struct {
|
||||
AlertOnLastAttempt bool `json:"alert_on_last_attempt,omitempty"`
|
||||
NoAlertForSkippedRuns bool `json:"no_alert_for_skipped_runs,omitempty"`
|
||||
|
@ -848,6 +853,7 @@ type DataSourceJobJobSettingsSettings struct {
|
|||
Compute []DataSourceJobJobSettingsSettingsCompute `json:"compute,omitempty"`
|
||||
Continuous *DataSourceJobJobSettingsSettingsContinuous `json:"continuous,omitempty"`
|
||||
DbtTask *DataSourceJobJobSettingsSettingsDbtTask `json:"dbt_task,omitempty"`
|
||||
Deployment *DataSourceJobJobSettingsSettingsDeployment `json:"deployment,omitempty"`
|
||||
EmailNotifications *DataSourceJobJobSettingsSettingsEmailNotifications `json:"email_notifications,omitempty"`
|
||||
GitSource *DataSourceJobJobSettingsSettingsGitSource `json:"git_source,omitempty"`
|
||||
Health *DataSourceJobJobSettingsSettingsHealth `json:"health,omitempty"`
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
|
||||
package schema
|
||||
|
||||
type ResourceArtifactAllowlistArtifactMatcher struct {
|
||||
Artifact string `json:"artifact"`
|
||||
MatchType string `json:"match_type"`
|
||||
}
|
||||
|
||||
type ResourceArtifactAllowlist struct {
|
||||
ArtifactType string `json:"artifact_type"`
|
||||
CreatedAt int `json:"created_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
MetastoreId string `json:"metastore_id,omitempty"`
|
||||
ArtifactMatcher []ResourceArtifactAllowlistArtifactMatcher `json:"artifact_matcher,omitempty"`
|
||||
}
|
|
@ -24,6 +24,11 @@ type ResourceJobDbtTask struct {
|
|||
WarehouseId string `json:"warehouse_id,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceJobDeployment struct {
|
||||
Kind string `json:"kind"`
|
||||
MetadataFilePath string `json:"metadata_file_path,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceJobEmailNotifications struct {
|
||||
AlertOnLastAttempt bool `json:"alert_on_last_attempt,omitempty"`
|
||||
NoAlertForSkippedRuns bool `json:"no_alert_for_skipped_runs,omitempty"`
|
||||
|
@ -852,6 +857,7 @@ type ResourceJob struct {
|
|||
Compute []ResourceJobCompute `json:"compute,omitempty"`
|
||||
Continuous *ResourceJobContinuous `json:"continuous,omitempty"`
|
||||
DbtTask *ResourceJobDbtTask `json:"dbt_task,omitempty"`
|
||||
Deployment *ResourceJobDeployment `json:"deployment,omitempty"`
|
||||
EmailNotifications *ResourceJobEmailNotifications `json:"email_notifications,omitempty"`
|
||||
GitSource *ResourceJobGitSource `json:"git_source,omitempty"`
|
||||
Health *ResourceJobHealth `json:"health,omitempty"`
|
||||
|
|
|
@ -12,15 +12,19 @@ type ResourceSqlTableColumn struct {
|
|||
type ResourceSqlTable struct {
|
||||
CatalogName string `json:"catalog_name"`
|
||||
ClusterId string `json:"cluster_id,omitempty"`
|
||||
ClusterKeys []string `json:"cluster_keys,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
DataSourceFormat string `json:"data_source_format,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Options map[string]string `json:"options,omitempty"`
|
||||
Partitions []string `json:"partitions,omitempty"`
|
||||
Properties map[string]string `json:"properties,omitempty"`
|
||||
SchemaName string `json:"schema_name"`
|
||||
StorageCredentialName string `json:"storage_credential_name,omitempty"`
|
||||
StorageLocation string `json:"storage_location,omitempty"`
|
||||
TableType string `json:"table_type"`
|
||||
ViewDefinition string `json:"view_definition,omitempty"`
|
||||
WarehouseId string `json:"warehouse_id,omitempty"`
|
||||
Column []ResourceSqlTableColumn `json:"column,omitempty"`
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ package schema
|
|||
|
||||
type Resources struct {
|
||||
AccessControlRuleSet map[string]*ResourceAccessControlRuleSet `json:"databricks_access_control_rule_set,omitempty"`
|
||||
ArtifactAllowlist map[string]*ResourceArtifactAllowlist `json:"databricks_artifact_allowlist,omitempty"`
|
||||
AwsS3Mount map[string]*ResourceAwsS3Mount `json:"databricks_aws_s3_mount,omitempty"`
|
||||
AzureAdlsGen1Mount map[string]*ResourceAzureAdlsGen1Mount `json:"databricks_azure_adls_gen1_mount,omitempty"`
|
||||
AzureAdlsGen2Mount map[string]*ResourceAzureAdlsGen2Mount `json:"databricks_azure_adls_gen2_mount,omitempty"`
|
||||
|
@ -87,6 +88,7 @@ type Resources struct {
|
|||
func NewResources() *Resources {
|
||||
return &Resources{
|
||||
AccessControlRuleSet: make(map[string]*ResourceAccessControlRuleSet),
|
||||
ArtifactAllowlist: make(map[string]*ResourceArtifactAllowlist),
|
||||
AwsS3Mount: make(map[string]*ResourceAwsS3Mount),
|
||||
AzureAdlsGen1Mount: make(map[string]*ResourceAzureAdlsGen1Mount),
|
||||
AzureAdlsGen2Mount: make(map[string]*ResourceAzureAdlsGen2Mount),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
package schema
|
||||
|
||||
type Providers struct {
|
||||
|
@ -24,7 +25,7 @@ func NewRoot() *Root {
|
|||
"required_providers": map[string]interface{}{
|
||||
"databricks": map[string]interface{}{
|
||||
"source": "databricks/databricks",
|
||||
"version": "1.28.0",
|
||||
"version": "1.29.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue