The example recipes are located in the examples/
directory. These are also used for testing the infrastructure using terratest, nonetheless, they are meant to run independently and be checked directly using vanilla terraform commands.
The recipe's structure is described below:
tree examples/
examples/
├── README.md
├── TaskFile.yml
└── default
└── basic
├── README.md
├── config
│ └── fixtures.tfvars
├── main.tf
├── providers.tf
├── variables.tf
└── versions.tf
NOTE: The parent directory
examples/
includes all the recipes, being default the "by default" recipe that represents the very basics of the module that's being developed.
Use Taskfile for doing so. The Taskfile.yml
file is located in the root of the repo, and it's used for running the recipes. The Taskfile tasks that are related to these recipes are customizable by the following input variables:
MODULE
: The module's name. Default:default
— it should match the module's name defined beneath the directoryexamples/
. E.g.:examples/<MODULE>/...
RECIPE
: The recipe's name. Default:basic
— it should match the recipe's name defined beneath the directoryexamples/<MODULE>/...
. E.g.:examples/<MODULE>/<RECIPE>/...
task recipe-init
task recipe-ci
task recipe-plan