Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI does not display preview for PF when detailed diff is specified #2620

Closed
VenelinMartinov opened this issue Nov 13, 2024 · 1 comment · Fixed by #2628
Closed

CLI does not display preview for PF when detailed diff is specified #2620

VenelinMartinov opened this issue Nov 13, 2024 · 1 comment · Fixed by #2628
Assignees
Labels
area/plugin-framework Support for Plugin Framework based providers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@VenelinMartinov
Copy link
Contributor

The CLI does not display a preview for PF bridged resources if the PF returns a detailedDiff in the Diff response. This might be an issue with the providerServer middle layer: https://github.com/pulumi/pulumi/blob/3149ab2047ad7bbf128f2e378085fc534b2924a3/sdk/go/common/resource/plugin/provider_server.go#L100

See the tests in #2602

example:

tfbridgetests.testOutput{
	initialValue: &[]string{},
	changeValue:  &[]string{"value"},
	tfOut: `
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # testprovider_test.res will be updated in-place
  ~ resource "testprovider_test" "res" {
        id  = "test-id"
      ~ key = [
          + "value",
        ]
    }

Plan: 0 to add, 1 to change, 0 to destroy.

`,
	pulumiOut: `Previewing update (test):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test]
    ~ testprovider:index/test:Test: (update)
        [id=test-id]
        [urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
Resources:
    ~ 1 to update
    1 unchanged
`,
	detailedDiff: map[string]interface{}{"keys[0]": map[string]interface{}{}},
}

@VenelinMartinov VenelinMartinov added kind/bug Some behavior is incorrect or out of spec area/plugin-framework Support for Plugin Framework based providers labels Nov 13, 2024
@VenelinMartinov VenelinMartinov self-assigned this Nov 18, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 25, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2628 and shipped in release v3.97.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin-framework Support for Plugin Framework based providers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants