Learn how Terraform project layout works and how you can structure the project files.

Terraform file

Until now, we have been creating several Terraform projects to get used to different concepts. In every project, though, we have been creating a single file called where we have placed all of our Terraform code (HCL). You may have wondered why all of the code was in a single file. Terraform actually does not care what the file’s name is, as long as it ends in .tf. So, in all of the projects thus far, we could have called the file,, or It really does not matter.

Get hands-on with 1200+ tech skills courses.