diff --git a/settings/data_notification_destinations.go b/settings/data_notification_destinations.go new file mode 100755 index 0000000000..a100ab113d --- /dev/null +++ b/settings/data_notification_destinations.go @@ -0,0 +1,18 @@ +package settings + +import ( + "context" + + "github.com/databricks/databricks-sdk-go" + "github.com/databricks/terraform-provider-databricks/common" +) + +func DataSourceNotificationDestinations() common.Resource { + type notificationDestinationsData struct { + Ids []string `json:"ids,omitempty" tf:"computed,slice_set"` + } + + return common.WorkspaceData(func(ctx context.Context, data *notificationDestinationsData, w *databricks.WorkspaceClient) error { + return nil + }) +} diff --git a/settings/data_notification_destinations_test.go b/settings/data_notification_destinations_test.go new file mode 100755 index 0000000000..584479b324 --- /dev/null +++ b/settings/data_notification_destinations_test.go @@ -0,0 +1,29 @@ +package settings + +import ( + "testing" + + "github.com/databricks/terraform-provider-databricks/qa" +) + +func TestDataSourceNotificationDestinations(t *testing.T) { + qa.ResourceFixture{ + Fixtures: []qa.HTTPFixture{ + // TODO: run this test to get fixtures + }, + Resource: DataSourceNotificationDestinations(), + Read: true, + NonWritable: true, + ID: "_", + }.ApplyNoError(t) +} + +func TestCatalogsData_Error(t *testing.T) { + qa.ResourceFixture{ + Fixtures: qa.HTTPFailures, + Resource: DataSourceNotificationDestinations(), + Read: true, + NonWritable: true, + ID: "_", + }.ExpectError(t, "i'm a teapot") +}