Skip to content

Conversation

@alexott
Copy link
Contributor

@alexott alexott commented Oct 24, 2025

Changes

Migrated the instance pool data source from SDKv2 to Terraform Plugin Framework using the Databricks Go SDK. The change is relatively low risk, so just went with direct implementation without fallback

Changes:

  • Created new plugin framework implementation in internal/providers/pluginfw/products/pools/
    • data_instance_pool.go: Main data source implementation using w.InstancePools.GetByInstancePoolName()
    • data_instance_pool_test.go: Unit tests
    • data_instance_pool_acc_test.go: Acceptance tests
  • Removed old SDKv2 implementation from pools/
    • pools/data_instance_pool.go
    • pools/data_instance_pool_test.go
  • Registered data source in pluginfw_rollout_utils.go as pluginFwOnlyDataSources
  • Removed SDKv2 registration from internal/providers/sdkv2/sdkv2.go

Implementation details:

  • Uses Go SDK's GetByInstancePoolName() for efficient lookup
  • Schema includes 'id' (computed, set to pool ID) and 'pool_info' (object type)
  • Maintains backward compatibility with SDKv2 schema structure
  • Uses production name: databricks_instance_pool

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

…amework

Migrated the instance pool data source from SDKv2 to Terraform Plugin Framework using the Databricks Go SDK.

Changes:
- Created new plugin framework implementation in internal/providers/pluginfw/products/pools/
  - data_instance_pool.go: Main data source implementation using w.InstancePools.GetByInstancePoolName()
  - data_instance_pool_test.go: Unit tests
  - data_instance_pool_acc_test.go: Acceptance tests
- Removed old SDKv2 implementation from pools/
  - pools/data_instance_pool.go
  - pools/data_instance_pool_test.go
- Registered data source in pluginfw_rollout_utils.go as pluginFwOnlyDataSources
- Removed SDKv2 registration from internal/providers/sdkv2/sdkv2.go

Implementation details:
- Uses Go SDK's GetByInstancePoolName() for efficient lookup
- Schema includes 'id' (computed, set to pool ID) and 'pool_info' (object type)
- Maintains backward compatibility with SDKv2 schema structure
- Uses production name: databricks_instance_pool
@alexott alexott requested review from a team as code owners October 24, 2025 09:13
@alexott alexott requested review from hectorcast-db and removed request for a team October 24, 2025 09:13
@alexott alexott temporarily deployed to test-trigger-is October 24, 2025 09:13 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 24, 2025 09:14 — with GitHub Actions Inactive
@alexott alexott changed the title [Internal] Ported databricks_instance_pool data source to plugin framework [Internal] Ported databricks_instance_pool data source to plugin framework and Go SDK Oct 24, 2025
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5145
  • Commit SHA: de1ffeb2f201acdd53805cfc4fc5cf0eee57d26f

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants