Is there a way I force a resource to be replace if...
# typescript
Is there a way I force a resource to be replace if any (or a specific list) of it's dependant resources change? My use case is I have an EC2 instance that downloads some files from S3 on boot up (via user data scripts). These files are instances of
defined in the same template. If the contents of these files change, they are correctly identified as requiring an update, but because their file names don't change, the instance's user data doesn't change and therefore the instance isn't flagged for any changes. i'm hoping I can tell Pulumi that the instance needs replacing if any of the files are updated - is this doable?
There is a
option you can pass when creating a resource, for links that pulumi doesn't track automatically.
the instance already depends on each of the files (since the file's outputs are used in the user data of the instace) but updates to the contents of the files won't trigger a replacement of the instance since the instance only depends on the file name, which doesn't change.