Skip to content

Commit 3eecd0f

Browse files
authored
[Internal] Unified provider support for resources and all data sources on SDKv2 using Go SDK (#5146)
## Changes <!-- Summary of your changes that are easy to understand --> - Add unified provider support for resources and datasources using Go SDK - Add support for jobs and clusters resources - Support for all data sources using Go SDK Keeping no change for these and will announce all together as part of documentation of unified TF. Keeping changelog now will cause lots of conflict during merging. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> Integration tests Unit tests NO_CHANGELOG=true
1 parent 254c96c commit 3eecd0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+943
-56
lines changed

aws/data_instance_profiles.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ func DataSourceInstanceProfiles() common.Resource {
1616
IsMeta bool `json:"is_meta,omitempty" tf:"computed"`
1717
}
1818
return common.WorkspaceData(func(ctx context.Context, data *struct {
19+
common.Namespace
1920
InstanceProfiles []instanceProfileData `json:"instance_profiles,omitempty" tf:"computed"`
2021
}, w *databricks.WorkspaceClient) error {
2122
instanceProfiles, err := w.InstanceProfiles.ListAll(ctx)

catalog/data_catalog.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceCatalog() common.Resource {
1212
return common.WorkspaceData(func(ctx context.Context, data *struct {
13+
common.Namespace
1314
Id string `json:"id,omitempty" tf:"computed"`
1415
Name string `json:"name"`
1516
Catalog *catalog.CatalogInfo `json:"catalog_info,omitempty" tf:"computed"`

catalog/data_catalogs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceCatalogs() common.Resource {
1212
return common.WorkspaceData(func(ctx context.Context, data *struct {
13+
common.Namespace
1314
Ids []string `json:"ids,omitempty" tf:"computed,slice_set"`
1415
}, w *databricks.WorkspaceClient) error {
1516
catalogs, err := w.Catalogs.ListAll(ctx, catalog.ListCatalogsRequest{})

catalog/data_current_metastore.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
func DataSourceCurrentMetastore() common.Resource {
1313
type CurrentMetastore struct {
14+
common.Namespace
1415
Id string `json:"id,omitempty" tf:"computed"`
1516
Metastore *catalog.GetMetastoreSummaryResponse `json:"metastore_info,omitempty" tf:"computed" `
1617
}

catalog/data_external_location.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceExternalLocation() common.Resource {
1212
type ExternalLocationByID struct {
13+
common.Namespace
1314
Id string `json:"id,omitempty" tf:"computed"`
1415
Name string `json:"name"`
1516
ExternalLocation *catalog.ExternalLocationInfo `json:"external_location_info,omitempty" tf:"computed" `

catalog/data_external_locations.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceExternalLocations() common.Resource {
1212
type externalLocationsData struct {
13+
common.Namespace
1314
Names []string `json:"names,omitempty" tf:"computed"`
1415
}
1516
return common.WorkspaceData(func(ctx context.Context, data *externalLocationsData, w *databricks.WorkspaceClient) error {

catalog/data_schema.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceSchema() common.Resource {
1212
return common.WorkspaceData(func(ctx context.Context, data *struct {
13+
common.Namespace
1314
Id string `json:"id,omitempty" tf:"computed"`
1415
Name string `json:"name"`
1516
Schema *catalog.SchemaInfo `json:"schema_info,omitempty" tf:"computed"`

catalog/data_schemas.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceSchemas() common.Resource {
1212
return common.WorkspaceData(func(ctx context.Context, data *struct {
13+
common.Namespace
1314
CatalogName string `json:"catalog_name"`
1415
Ids []string `json:"ids,omitempty" tf:"computed,slice_set"`
1516
}, w *databricks.WorkspaceClient) error {

catalog/data_storage_credential.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceStorageCredential() common.Resource {
1212
type AccountMetastoreByID struct {
13+
common.Namespace
1314
Id string `json:"id,omitempty" tf:"computed"`
1415
Name string `json:"name"`
1516
StorageCredential *catalog.StorageCredentialInfo `json:"storage_credential_info,omitempty" tf:"computed" `

catalog/data_storage_credentials.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
func DataSourceStorageCredentials() common.Resource {
1212
type storageCredentialsData struct {
13+
common.Namespace
1314
Names []string `json:"names,omitempty" tf:"computed"`
1415
}
1516
return common.WorkspaceData(func(ctx context.Context, data *storageCredentialsData, w *databricks.WorkspaceClient) error {

0 commit comments

Comments
 (0)