The difficult part about structuring a Terraform project is that several solutions exist and there is no universal guide. The code structure would highly depend on the size of the project, complexity, the number of environments, how often the infrastructure changes, etc...
For simple projects which contain just a few