pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
95 stars 17 forks source link

Refresh does not show changes #1796

Open flostadler opened 1 week ago

flostadler commented 1 week ago

What happened?

The Read implementation of aws-native is incorrectly returning the old inputs instead of the newly refreshed ones. https://github.com/pulumi/pulumi-aws-native/blob/0166a6357100a309d815a53cc4ac986c3fa96aab/provider/pkg/provider/provider.go#L1018

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;

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

t0yv0 commented 1 week ago

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