generator-terraform-module

0.7.0 • Public • Published

Yeoman

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


Generator: Terraform Module

Requirements

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

Installation

  • 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 https://bitbucket.org/cultivatedops/generator-terraform-module/get/HEAD.tar.gz

Usage

In order to run the included generator, open a console (Terminal.app, 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
├── README.md
├── main.tf
├── output.tf
└── variables.tf

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-.

Demo

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

Demo of the generator in Gif format

Maintainers

This generator is currently maintained by the individuals listed below:

Sponsors

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

License

generator-terraform-module is licensed under the Apache 2.0 license. A full copy of the license can be found on the apache.org 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.

Package Sidebar

Install

npm i generator-terraform-module

Weekly Downloads

9

Version

0.7.0

License

Apache-2.0

Last publish

Collaborators

  • ninjatux