Cookiecutter template for creating Terraform Workspaces.
Also checkout cookiecutter-tf-module.
- The Core Terraform Workflow
- One Workspace Per Environment Per Terraform Configuration
- Create a Workspace
- Should You Create A Module?
- Using Modules from the Terraform Cloud Private Module Registry
- Automate Terraform with GitHub Actions
$ pip install cookiecutter
$ cookiecutter git@github.com:aidanmelen/cookiecutter-tf-workspace.git
$ cd [tf_WORKSPACE]
$ make
You will be prompted for basic info (your name, workspace name, etc.) which will be used in the template.
This will create the following:
terraform-workspace-example
├── Makefile
├── README.md
├── docs
│ └── developer-notes.md
├── main.tf
├── outputs.tf
├── provider.tf
├── tests
└── variables.tf
That's all you need to get started.
$ make test
cookiecutter ./ --overwrite-if-exists --no-input --output-dir ./test/
-
This project was inspired heavily by the terraform-aws-eks community module. Many thanks to the authors for all there hard work.
-
Shootout to cjolowicz for demonstrating the power of
pre-commit
andgithub actons
in his highly recommend Hypermodern Python blog! His work creating the cookiecutter-hypermodern-python was a big inspiration in creating this template.