Cloud Posse is a prolific producer of Open Source terraform modules. A fun fact is that every module we have is the result of some customer contribution that sponsored the development of the module. That has resulted in a snowball effect so that now we have hundreds of modules and countless battle scars.
To get where we are today, we made a lot of mistakes.
We had Inconsistent Resource Names. Used lots of string concatenation to build resource names, but there was poor consistency, and frequently a module couldn't be instantiated more than once in an account.
We bought into the "terraform workspaces are evil" mantra and reinvented the concept of workspaces without using workspaces (because that is what everyone does who has multiple environments and doesn't use workspaces)
Here are some things we've learned along the way to watch out for.
Stop...
Using folder structures to connote your state. Refactoring changes your state. Do Yudel folder structures to connote the states of your applications? Probably not. The. Why for your infra?
Do any of these mistakes sound familiar?