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

PF previews do not display default values in added properties #2659

Open
VenelinMartinov opened this issue Nov 22, 2024 · 0 comments
Open

PF previews do not display default values in added properties #2659

VenelinMartinov opened this issue Nov 22, 2024 · 0 comments
Labels
area/plugin-framework Support for Plugin Framework based providers awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). bug/diff Bugs in computing Diffs and planning resource changes kind/bug Some behavior is incorrect or out of spec

Comments

@VenelinMartinov
Copy link
Contributor

When previewing a resource change which adds a property in a Plugin Framework resource we do not display defaults applied to that new property. The reason for that is that the engine does not have access to the planned values and we do not apply defaults in Check for PF. Likely blocked on #2281

Example:

    ~ testprovider:index/test:Test: (update)
        [id=test-id]
        [urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
      - keys: []

versus TF:

  ~ resource "testprovider_test" "res" {
        id  = "test-id"
      ~ key = [
          + "value",
        ]
    }

Also

    +-testprovider:index/test:Test: (replace)
        [id=test-id]
        [urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
      ~ key: {
          - nested: "value"
        }

versus TF:

+/- resource "testprovider_test" "res" {
      ~ id = "test-id" -> (known after apply)

      ~ key { # forces replacement
          ~ nested = "value" -> "default"
        }
    }

See TestDetailedDiffSet/attribute_with_default/changed_empty_to_null and TestDetailedDiffObject/nested_block_default_replace/changed_non-empty_to_empty

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Nov 22, 2024
@VenelinMartinov VenelinMartinov added kind/bug Some behavior is incorrect or out of spec area/plugin-framework Support for Plugin Framework based providers bug/diff Bugs in computing Diffs and planning resource changes blocked The issue cannot be resolved without 3rd party action. awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team blocked The issue cannot be resolved without 3rd party action. labels Nov 22, 2024
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 awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). bug/diff Bugs in computing Diffs and planning resource changes kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants