Skip to content

Generate skeleton terraform module from example in terraform.io docs

Notifications You must be signed in to change notification settings

thepastelsuit/terramod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

terramod

Generate skeleton terraform module from example in terraform.io docs

Dependencies

  • NodeJS
  • cheerio (terramod will try to install this module itself)

Instructions

  1. Pull this repo
$ cd ~
$ git clone git@github.com:thepastelsuit/terramod.git
  1. Symlink to a location in your path
$ cd ~/bin
$ ln -s ~/terramod/terramod terramod
  1. Navigate to the root of your terraform project and run
$ cd ~/my-project
$ terramod <aws resource name>

CLI Arguments

The script takes arguments as such terramod <aws resource name> <example number from docs>.

<aws resource name> is found at the end of a Terraform doc page before the .html, i.e. https://www.terraform.io/docs/providers/aws/r/api_gateway_integration.html

<example number from docs> will default to 1 and use the first example found on that doc page. Some resources in the terraform docs have multiple examples, and you can pass a different value to have terramod generate your main.tf file from that example instead.

About

Generate skeleton terraform module from example in terraform.io docs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published