Open zbuchheit opened 9 months ago
Documenting a workaround to this issue for other users. I was able to resolve this issue by using replaceOnChanges set to the source to trigger a replace when the source changes.
const object = new googleNative.storage.v1.BucketObject('zbuchheit-native-bucket-object', {
bucket: bucket.name,
source: functionArchive,
}, {
replaceOnChanges: ["source"], //Workaround
});
What happened?
Background
When attempting to use a Bucket Object, I observed that changing a bucket object's content was not actually resulting in changes on the bucket object. Changes to the object triggered an update on the Bucket Object, but when you download the content you will see no changes have actually been reflected.
Example
function.js
Functionindex.ts
SnippetExample Repo
https://github.com/zbuchheit/pulumi-examples/tree/main/gcp-native-ts-function-v2
Output of
pulumi about
Additional Context
It is worth noting in the
pulumi-gcp
provider, a source change to a bucket object will result in a replace of the resource, and in thepulumi-google-native
provider it will only result in an update of the resource. Below is an example preview between the two resources.Related Issue
I encountered this issue when attempting to replicate #370 which this issue is the root cause for. This could be viewed as a duplicate as #370 but I believe this issue to be more reflective of the upstream issue.
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).