Scaffolding for your Terraform Module

Usage no npm install needed!

<script type="module">
  import generatorTerraformModule from '';



Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive

Generator: Terraform Module


In order to run this generator, you will need the following:

  • an up-to-date installation of Yeoman
  • an up-to-date version of this generator


  • install Yeoman
  • install this generator

To install Yeoman, run the following command in your console:

npm install -g yo bower grunt-cli

This will make Yeoman (via yo) as well as the base dependencies of Yeoman, namely Bower and Grunt available.

Note that you might require sudo permissions to install the above modules globally.

To install this generator, run the following command in your console:

npm install -g generator-terraform-module

Alternatively, you can install the generator directly from Git HEAD by running the following command:

npm install -g


In order to run the included generator, open a console (, PuTTY) and change into the directory you want to generate the module in. Then, run the following command:

yo terraform-module

Should the above command fail, verify that Yeoman does indeed see the generator by executing yo and looking for an entry named "Terraform Module".

On an initial run, you will be asked to provide your full name and email address. These values will be stored for future use.

After all questions have been answered, Yeoman will generate the scaffolding needed to kickstart a Terraform module.

The layout for a generated module will look like so:

├── .editorconfig
├── .gitignore
├── .release.json

The .release.json file is optional and will only be created when Release It! support is enabled during the generation.

The files will be placed in a directory containing the name you provided for the module, prefixed by terraform-module-.


The following animation shows how the generator looks like, in action:

Demo of the generator in Gif format


This generator is currently maintained by the individuals listed below:


This generator was sponsored by the individuals and companies listed below:


generator-terraform-module is licensed under the Apache 2.0 license. A full copy of the license can be found on the site.

In short, this license permits you to use this product commercially, distribute this software and make modifications.

The software is provided without warranty and any contributors cannot be held liable for damages. You are also not allowed to use any name, logo or trademark without prior consent.