# general


02/07/2020, 11:07 AM
This is referring back to a previous question: I’ve rewritten everything to component resources now…So I have one that has a deployment + a Persistent Volume Claim. But how do I make it so that if the config of the deployment changes it doesn’t just try to update that deployment and tries to mount the same PVC, but also creates a new PVC?


02/07/2020, 4:41 PM
There’s an
feature which lets you say that the old resources are really the same as the new resources so don’t try to replace one with the other. That is generally what you want when refactoring things into components.
Oh - I think I misinterpreted the question actually - that may not be what you are actually asking about here.
I actually don’t have a great suggestion on the original question. You would need to cause some input to the PVC that forces replacement to change if-and-only-if the deployment is going to change. That could be hashing the values of key inputs which would cause updates and passing in to a force replace property of the pvc? @gorgeous-egg-16927 might have other thoughts on patterns here.


02/07/2020, 7:00 PM
There may be a cleaner way to handle this, but here’s a working example:


02/08/2020, 4:40 PM
The problem is that It might not be some input arg that controls the re-creation of the resource. Essentially I would like to not just create a child-parent relationship but create a “pod” where if one of the resources is going to be replaced it will replace (read re-create) all the resources in the pod