Skip to main content

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. image.png

And then you try to fix it using count.index image.png

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: image.png

image.png

And will delete the original -1 for whatever reason image.png

And subsequent terraform plans will create: image.png