tfmodule

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 4 Imported by: 0

README

tfmodule

test Coverage Status

tfmodule is a CLI tool for managing Terraform modules.

Usage

tfmodule has sub-commands template , analyze .

NOTE: in progress status, so you can use only template sub-command.

template

template parses the Terraform module configuration in the given file path, and outputs a template for the module.

$ tfmodule template ../modules/hoge
module "hoge" {
  source = "../modules/hoge"

  // variable discription
  // type: number
  instance_counts = 2
  // variable discription
  // type: string
  instance_comment = "" // no default value
}

# You can replace module name in the template with -n or --name option.
# Use the --minimum option, ignore variables with default values.
$ tfmodule template ../modules/hoge -n fuga --minimum
module "fuga" {
  source = "../modules/hoge"

  // variable discription 
  // type: string
  instance_comment = "" // no default value
}
analyze

analyze analyzes a Terraform module configuration and outputs the description about its internal structure.

$ tfmodule analyze "../modules/hoge"
resources:
aws_s3_bucket.s3_bucket
aws_s3_bucket_policy.s3_bucket_policy

outputs:
bucket_arn: aws_s3_bucket.s3_bucket.arn

Author

chroju chor.chroju@gmail.com

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL