Hi all, What is the detail difference `--replace` ...
# getting-started
k
Hi all, What is the detail difference
--replace
parameter and
--target
parameter in
pulumi preview
or
pulumi up
command?
d
Target only runs the necessary operations on the target. Let's say you have an s3 bucket that has had a code change, and you only want to update the s3 bucket, you'd use Target. Replace will mark a resource for recreation, so delete + recreate
k
Then if I want to recreate only one of my resources, do I use
--target
parameter not
--replace
parameter? (if the code changed)
d
If it's already marked for recreation because of code changes, then yes. Otherwise, use Replace
k
Finally, I understand two parameter's mechanism. Thank you Anthony