3 ms·
Make it so that TF deletes anything not in your config unless whitelisted next question.
by nailer 4y ago
Make it so that TF deletes anything not in your config unless whitelisted next question.
- jen20 4y agoNext question: what if your database is managed by a separate team in the same account? Just delete it eh?
- nailer 4y agoYes. The tool warned you it would do this during the plan phase.
- jen20 4y agoThis is absolutely the worst design for a tool imaginable. Any tooling fit for purpose must make peace with the fact that one team, and thus application of a tool, do not own an entire account.
- nailer 4y agoUltimately if you’re managing your infrastructure as code you must manage your infrastructure as code. Cattle not pets.
- moondev 4y agoWhat about the opposite which is how kubectl works. "terraform delete" only deletes what is in your config. "terraform apply" only creates and/or updates what is in your config. If you remove a resource from your config after applying it, it's your responsibility to manually delete it.
- pharmakom 4y agoNot having to manually delete is one of the reasons I use Terraform. Managing state is much less painful than that would be.