Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e52006d
workspace_id support of SDKv2 resources using Go SDK
Divyansh-db Mar 18, 2026
456b19f
Merge branch 'main' into divyansh-vijayvergia_data/dwsid-sdkv2-go-sdk
Divyansh-db Mar 19, 2026
a52eab2
fixed test
Divyansh-db Mar 19, 2026
aa55a8a
fixed existing behaviour of integration tests
Divyansh-db Mar 19, 2026
cba7b53
Merge branch 'main' into divyansh-vijayvergia_data/dwsid-sdkv2-go-sdk
Divyansh-db Mar 19, 2026
bdec6fc
Merge branch 'main' into divyansh-vijayvergia_data/dwsid-sdkv2-go-sdk
Divyansh-db Mar 19, 2026
3ce9a13
added support for SDKv2 resources which do not use go sdk
Divyansh-db Mar 20, 2026
85d60da
Merge branch 'main' into divyansh-vijayvergia_data/dwsid-sdkv2-go-sdk
Divyansh-db Mar 20, 2026
d93748a
refactored acceptance tests
Divyansh-db Mar 20, 2026
ee64a9d
fixed tests
Divyansh-db Mar 20, 2026
4ac2e20
Merge branch 'main' into divyansh-vijayvergia_data/dwsid-sdkv2-go-sdk
Divyansh-db Mar 20, 2026
6d4ef97
fixed tests
Divyansh-db Mar 20, 2026
7116c4b
fixed test names
Divyansh-db Mar 22, 2026
3f42734
fixed integration test
Divyansh-db Mar 22, 2026
3f1ac9d
d.set() returns error
Divyansh-db Mar 22, 2026
603bc63
workspace_id resolution from host made lazy
Divyansh-db Mar 22, 2026
e4135ad
made error message more intuitive
Divyansh-db Mar 22, 2026
f86123b
removed host type from a check
Divyansh-db Mar 22, 2026
104c332
reverted to warning
Divyansh-db Mar 22, 2026
ac77de3
fixed tests
Divyansh-db Mar 27, 2026
b4c9f75
use lazy caching and hard error
Divyansh-db Mar 27, 2026
33b2076
Merge branch 'main' into dwsid-sdkv2-go-sdk
Divyansh-db Mar 27, 2026
514cc7c
Merge branch 'main' into dwsid-sdkv2-go-sdk
Divyansh-db Mar 27, 2026
e5043dd
made workspace_id optional+computed
Divyansh-db Mar 27, 2026
e57c5ab
remove stale tests
Divyansh-db Mar 27, 2026
cf8c8c7
fix empty PC tests
Divyansh-db Mar 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions access/sql_permissions_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ func TestAccSqlPermissions_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccSqlPermissions_ProviderConfig_Required(t *testing.T) {
// TestAccSqlPermissions_ProviderConfig_EmptyBlock verifies that an empty
// provider_config {} block is valid (workspace_id is Optional+Computed).
func TestAccSqlPermissions_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: sqlPermissionsProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
11 changes: 0 additions & 11 deletions aws/instance_profile_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ func TestAccInstanceProfile_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccInstanceProfile_ProviderConfig_Required(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: instanceProfileProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
})
}

func TestAccInstanceProfile_ProviderConfig_EmptyID(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: instanceProfileProviderConfigTemplate(`
Expand Down
11 changes: 0 additions & 11 deletions aws/service_principal_role_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ func TestAccServicePrincipalRole_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccServicePrincipalRole_ProviderConfig_Required(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: servicePrincipalRoleProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
})
}

func TestAccServicePrincipalRole_ProviderConfig_EmptyID(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: servicePrincipalRoleProviderConfigTemplate(`
Expand Down
11 changes: 0 additions & 11 deletions aws/user_role_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ func TestAccUserRole_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccUserRole_ProviderConfig_Required(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: userRoleProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
})
}

func TestAccUserRole_ProviderConfig_EmptyID(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: userRoleProviderConfigTemplate(`
Expand Down
17 changes: 3 additions & 14 deletions catalog/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,6 @@ func TestAccCatalog_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccCatalog_ProviderConfig_Required(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: catalogProviderConfigTemplate("test_catalog_{var.STICKY_RANDOM}", `
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
})
}

func TestAccCatalog_ProviderConfig_EmptyID(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: catalogProviderConfigTemplate("test_catalog_{var.STICKY_RANDOM}", `
Expand Down Expand Up @@ -324,7 +313,7 @@ func TestAccCatalog_ProviderConfig_Match(t *testing.T) {
`, workspaceIDStr)),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionUpdate),
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionNoop),
},
},
})
Expand Down Expand Up @@ -354,7 +343,7 @@ func TestAccCatalog_ProviderConfig_Recreate(t *testing.T) {
`),
ConfigPlanChecks: resource.ConfigPlanChecks{
PostApplyPreRefresh: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionUpdate),
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionDestroyBeforeCreate),
},
},
PlanOnly: true,
Expand Down Expand Up @@ -382,7 +371,7 @@ func TestAccCatalog_ProviderConfig_Remove(t *testing.T) {
Template: catalogProviderConfigTemplate(catalogName, ""),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionUpdate),
plancheck.ExpectResourceAction("databricks_catalog.this", plancheck.ResourceActionNoop),
},
},
})
Expand Down
7 changes: 4 additions & 3 deletions catalog/credential_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ func TestAccCredential_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccCredential_ProviderConfig_Required(t *testing.T) {
// Empty provider_config {} is valid since workspace_id is Optional+Computed.
func TestAccCredential_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: credentialProviderConfigTemplate("tf-test-cred-{var.STICKY_RANDOM}", `
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
7 changes: 4 additions & 3 deletions catalog/metastore_assignment_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ func TestAccMetastoreAssignment_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccMetastoreAssignment_ProviderConfig_Required(t *testing.T) {
// Empty provider_config {} is valid since workspace_id is Optional+Computed.
func TestAccMetastoreAssignment_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: metastoreAssignmentProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
7 changes: 4 additions & 3 deletions catalog/metastore_data_access_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ func TestAccMetastoreDataAccess_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccMetastoreDataAccess_ProviderConfig_Required(t *testing.T) {
// Empty provider_config {} is valid since workspace_id is Optional+Computed.
func TestAccMetastoreDataAccess_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: metastoreDataAccessProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
7 changes: 4 additions & 3 deletions catalog/metastore_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ func TestAccMetastore_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccMetastore_ProviderConfig_Required(t *testing.T) {
// Empty provider_config {} is valid since workspace_id is Optional+Computed.
func TestAccMetastore_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: metastoreProviderConfigTemplate("tf-test-metastore-{var.STICKY_RANDOM}", `
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
3 changes: 2 additions & 1 deletion catalog/resource_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,8 @@ func TestCatalogSuppressCaseSensitivity(t *testing.T) {
"storage_location": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"provisioning_info.#": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"effective_predictive_optimization_flag.#": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"full_name": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"full_name": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"provider_config.#": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
},
HCL: `
name = "A"
Expand Down
2 changes: 2 additions & 0 deletions catalog/resource_sql_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,8 @@ func TestResourceSqlTable_Diff_ExistingResource(t *testing.T) {
if expectedDiff == nil {
expectedDiff = make(map[string]*terraform.ResourceAttrDiff)
}
// provider_config is Optional+Computed, so it always appears as computed in the diff
expectedDiff["provider_config.#"] = &terraform.ResourceAttrDiff{Old: "", New: "", NewComputed: true}
qa.ResourceFixture{
HCL: `
catalog_name = "main"
Expand Down
7 changes: 4 additions & 3 deletions catalog/storage_credential_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ func TestAccStorageCredential_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccStorageCredential_ProviderConfig_Required(t *testing.T) {
// Empty provider_config {} is valid since workspace_id is Optional+Computed.
func TestAccStorageCredential_ProviderConfig_EmptyBlock(t *testing.T) {
acceptance.UnityWorkspaceLevel(t, acceptance.Step{
Template: storageCredentialProviderConfigTemplate("tf-test-sc-{var.STICKY_RANDOM}", `
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
PlanOnly: true,
ExpectNonEmptyPlan: true,
})
}

Expand Down
11 changes: 0 additions & 11 deletions catalog/table_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ func TestAccTable_ProviderConfig_Invalid(t *testing.T) {
})
}

func TestAccTable_ProviderConfig_Required(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: tableProviderConfigTemplate(`
provider_config {
}
`),
ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
PlanOnly: true,
})
}

func TestAccTable_ProviderConfig_EmptyID(t *testing.T) {
acceptance.WorkspaceLevel(t, acceptance.Step{
Template: tableProviderConfigTemplate(`
Expand Down
37 changes: 33 additions & 4 deletions common/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading