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;
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).
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#L1018This 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-runningpulumi 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
pulumi up
and noteparamName
outputpulumi stack export --file old.json
aws ssm put-parameter --name $PARAM_NAME --value "new-value" --type "String" --overwrite
pulumi refresh
: Observe no changes being shownpulumi 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 onespulumi 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 nowOutput 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).