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

PlanResourceChange: Empty resource labels keeps old label value #2083

Closed
VenelinMartinov opened this issue Jun 12, 2024 · 1 comment
Closed
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed

Comments

@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Jun 12, 2024

Describe what happened

Under PlanResourceChange, when changing a resource label from any value to empty it keeps the old value.

This matches the TF behaviour. #2078 for details

Sample program

let bucket = new gcp.storage.Bucket("test", {
    location: "US",
    labels = {"key": "val"},
});

changes to

let bucket = new gcp.storage.Bucket("test", {
    location: "US",
    labels = {"key": ""},
});

But the cloud value remains "val"

Log output

.

Affected Resource(s)

No response

Output of pulumi about

.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@VenelinMartinov VenelinMartinov added the kind/bug Some behavior is incorrect or out of spec label Jun 12, 2024
VenelinMartinov added a commit that referenced this issue Jun 24, 2024
Under PRC we match the TF behaviour for labels, which combined with the
new refresh behaviour fails TestLabelsCombinationsGo.

The reason for that is that in TF, empty strings for a label is taken to
mean "maintain old value":
#2083

This produces a permadiff if one of the labels is an empty string, as
that is unknown at preview time. This is the correct behaviour here as
there could be a change in that label, depending on the value in the
cloud.

This PR adds a skip to these tests for the refresh step.
@VenelinMartinov VenelinMartinov added the resolution/by-design This issue won't be fixed because the functionality is working as designed label Sep 4, 2024
@VenelinMartinov
Copy link
Contributor Author

Closing as working as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed
Projects
None yet
Development

No branches or pull requests

1 participant