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

Refresh does not show changes #1796

Open
flostadler opened this issue Nov 4, 2024 · 1 comment
Open

Refresh does not show changes #1796

flostadler opened this issue Nov 4, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@flostadler
Copy link
Contributor

What happened?

The Read implementation of aws-native is incorrectly returning the old inputs instead of the newly refreshed ones.

This has the effect that pulumi refresh will not show any resources to be changed. Applying this empty refresh will still modify the state though and align it with the actual values of the physical resource.
Re-running pulumi refresh again will now show a diff, but applying it will not change the properties, it will only align the Inputs saved in state.

Example

import * as aws from "@pulumi/aws-native";

const ssmParam = new aws.ssm.Parameter("my-param", {
    type: aws.ssm.ParameterType.String,
    value: "old-value",
})

export const paramName = ssmParam.name;
export const paramValue = ssmParam.value;
  • pulumi up and note paramName output
  • pulumi stack export --file old.json
  • aws ssm put-parameter --name $PARAM_NAME --value "new-value" --type "String" --overwrite
  • pulumi refresh: Observe no changes being shown
  • pulumi stack export --file new.json
  • diff old.json new.json: Observe that value of the SSM parameter has been updated, but the inputs are still the old ones
  • pulumi refresh: Shows that the value is changing from "new-value" to "old-value"
  • pulumi stack export --file new2.json
  • diff new.json new2.json: The inputs have been aligned now

Output of pulumi about

n/a

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).

@flostadler flostadler added the kind/bug Some behavior is incorrect or out of spec label Nov 4, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Nov 4, 2024
@flostadler flostadler removed the needs-triage Needs attention from the triage team label Nov 4, 2024
@t0yv0
Copy link
Member

t0yv0 commented Nov 4, 2024

This sounds pretty serious, so drift detection might not be working as expected.

@mjeffryes mjeffryes added this to the 0.113 milestone Nov 13, 2024
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
Projects
None yet
Development

No branches or pull requests

4 participants