https://pulumi.com logo
#typescript
Title
# typescript
b

breezy-butcher-78604

09/15/2020, 7:06 AM
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
aws.s3.BucketObjects
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?
h

hundreds-musician-51496

09/15/2020, 5:20 PM
There is a
dependsOn
option you can pass when creating a resource, for links that pulumi doesn't track automatically.
b

breezy-butcher-78604

09/16/2020, 12:50 AM
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.