It's a template for creating a new Terraform project with best practices and modular structure.
- Modular structure with separate modules for each component
- Separate environments for production and staging
- Customizable variables for each environment
- Built-in error handling and logging
- Integration with popular CI/CD tools
- Terraform installed on your machine
- Basic knowledge of Terraform and its syntax
- Access to the cloud provider you want to use (e.g., AWS, GCP, etc.)
- Clone this repository
- Create a new directory for your project
- Copy the
terraform
directory from this repository into your project directory - Customize the
main.tf
file to match your infrastructure requirements - Run
terraform init
to initialize the Terraform configuration - Run
terraform plan
to view the planned changes - Run
terraform apply
to apply the changes
prod
: Production environmentstage
: Staging environmentmodules
: Custom modules directorymodules/network
: Network module
This repository is licensed under the MIT License. See the LICENSE file for details.
Thanks to @antonbabenko for the Terraform Best Practices free ebook that served as a starting point for this template.