feat: Add support for tfvars hcl and json commands (#226)

* Add support for tfvars hcl and json commands

* fix docs generation header issue

* align padding of hcl tfvars items

* add more tests

* update docs

* wording
This commit is contained in:
Khosrow Moossavi
2020-03-27 15:02:09 -04:00
committed by GitHub
parent 4365b4997b
commit 9043f268ad
44 changed files with 1874 additions and 11 deletions

View File

@@ -131,6 +131,10 @@ func getPrinter(name string, settings *print.Settings) print.Format {
return format.NewTable(settings)
case "pretty":
return format.NewPretty(settings)
case "tfvars hcl":
return format.NewTfvarsHCL(settings)
case "tfvars json":
return format.NewTfvarsJSON(settings)
case "xml":
return format.NewXML(settings)
case "yaml":
@@ -159,6 +163,7 @@ func printExample(buf *bytes.Buffer, name string) error {
settings.ShowColor = false
options := &module.Options{
Path: "./examples",
ShowHeader: true,
HeaderFromFile: "main.tf",
SortBy: &module.SortBy{
Name: settings.SortByName,