5 ms·
In Chef, you have to change the resource to `action :remove` if you want it deleted. Couldn't you do something like that?
by runlevel1 4y ago
In Chef, you have to change the resource to `action :remove` if you want it deleted.
Couldn't you do something like that?
- zoul 4y agoYou could, but then you are losing what I think is the main point of TF – describing what the infra should look like and letting the tool figure out what the necessary steps are for reaching that state.
- runlevel1 4y agoIt can still be declarative for the things that it manages. Perhaps Puppet would have been the better analogy (i.e. `ensure => absent`). While Terraform providers can be built to do a lot of implicit work, in practice they don't. In my experience, you still have to specify all the pieces. The only place I can think of where auto-deletion came in handy was for infrastructure CI. However, that CI pipeline doesn't catch many critical issues, and it's very expensive to operate. So I can't say it's been a total win.
- jon_adler 4y agoOne of terraforms key design principles is that it is declarative whereas this instruction is imperative.