Appendix A: Tips
Random tips and tricks that I've run into over the years.
Oddities with count
If you don't use count.index, you can sometimes create 3 resources, but in reality, you've only created one.
And then you try to fix it using count.index
And then terraform doesn't understand what to do. It's deleting things that don't exist, and it's taking a log time to do so:
And will delete the original -1 for whatever reason
And subsequent terraform plans will create: