4 ms·
That just means that enabling `prevent_destroy` later on will a) destroy the resource b) create a new resource with a different name and `prevent_destroy` enabl
by terom 5y ago
That just means that enabling `prevent_destroy` later on will a) destroy the resource b) create a new resource with a different name and `prevent_destroy` enabled.
Plus the combinatorial explosion of all possible conditions.
Not a good trick.
- usr1106 5y agoWhy would I want to enable it later? When I deploy production they ave enable_destroy. It's the same resource all the time and it must not be destroyed. When I want to deploy a test system the resource can be destroyed after I am done. Of course this is not really elegant code. It violates DRY, I need to make sure that my test resources have identical configuration as my production resources, except this one attribute. Maybe your use case is different. I never change the prevent_destroy attribute during the lifetime of the resource.