Skip to content

Conversation

tanmay-db
Copy link
Contributor

@tanmay-db tanmay-db commented Aug 22, 2025

BLOCKED

To be merged after: #4965 and #4969

Changes

Make the plugin framework implementation of share resource as default. With this change, databricks_share will use the plugin framework implementation.

Tests

Integration tests

  • Applying: SDKv2 -> Plugin Framework
  • Applying: Plugin Framework -> SDKv2

@tanmay-db tanmay-db requested review from a team as code owners August 22, 2025 11:00
@tanmay-db tanmay-db requested review from parthban-db and removed request for a team August 22, 2025 11:00
@tanmay-db tanmay-db removed request for a team and parthban-db August 22, 2025 11:00
@tanmay-db tanmay-db changed the title Pluginframework share [Internal] Make plugin framework implementation of share resource as default Aug 22, 2025
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 10:44 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 10:44 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 13:59 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 13:59 — with GitHub Actions Inactive
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: 4967
  • Commit SHA: 9b05ed1b1169f28ce5c08c89c31a2f839c2412f7

Checks will be approved automatically on success.

github-merge-queue bot pushed a commit that referenced this pull request Sep 17, 2025
…4965)

## Changes
<!-- Summary of your changes that are easy to understand -->
Plugin framework implementation of share resource is not compatible with
SDKv2. Compatibility difference arises because of how these libraries
apply the changes internally:

Plugin Framework checks if the state is null for creation:
https://github.com/hashicorp/terraform-plugin-framework/blob/main/internal/fwserver/server_applyresourcechange.go#L47
````go
// If PriorState is missing/null, its a Create request.
if req.PriorState == nil || req.PriorState.Raw.IsNull() {...}
````

Whereas SDKv2 checks the ID:
https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/schema/resource.go#L976
````go
if data.Id() == "" {
// We're creating, it is a new resource.
...
}
````

Because of the incompatibility, SDKv2 re-creates the share resource
after it has been created by plugin framework. The PR adds the ID field
as part of schema. This change makes the plugin framework implementation
compatible with SDKv2



## Tests
<!--
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->
- Integration tests
- Also E2E tested for applying share resource in SDKv2 after it's been
applied by plugin framework in:
#4967

---------

Co-authored-by: vuong-nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants