* Allow reading header from a markdown file
* wording
* add supports for .adoc and .txt as well
* wording
* revert docs
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
* Mark variables not required if default set to null
* Move github.com/hashicorp/terraform-config-inspect to internal/tfconfig
Internally we depend on terraform-config-inspect, but at the moment
they state that they consider the project is feature-complete and
they do not accept any enhancement pull requests, as such we've
decided to bring over the project as internal package here rather than
being a vendor dependency and apply the fix from @jstewmon from
https://github.com/hashicorp/terraform-config-inspect/pull/24 directly
here.
Since the terraform-config-inspect is considered to be feature-complete
we don't expect to have any more changes on the package, and if there
was a change on upstream we're going to bring it down in the
corresponding package.
* Add notice to the new package
* add license of terraform-config-inspect code
* fix tests after merging master
* fix test after merge master
* show 'required' attribute in JSON, XML, YAML
* update docs
* Allow users to pass '--output-values'
Pass empty string to CreateModule.outputValuePath
* Fix bug causing 'pretty' tests to fail
* Link formats documentation in README (#181)
Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com>
* docs: Auto generate formats document from examples (#192)
* Auto generate formats document from examples
* fix lint issues
* refactor: Add tfconf.Options to load Module with (#193)
* Update Changelog
* Allow users to pass '--output-values'
Read the outputValuesPath from an env variable
Use an env var with a path for '--output-values'
Update Changelog
Use an env var with a path for '--output-values'
Update Changelog
properly write output values for evrythng but yaml
* Fix failing json+yaml tests
* Remove unneeded code block from output.go
* Remove unused import statement from output.go
* Fix some noob mistakes
* Create two flags to use for output value injection
* Fix bug vanilla commands+build test to fail
* Modify all tests and add new for outputvalues
* Modify to include many output types
* Optimize imports to appease checkfmt
* Create loadOutputValues function
* Fix linter issue
* Code review fixes. Hopefully the final commit!
* appease linter
* Not allow sensitive output values to be injected
* Remove trailing slash from tests
* Remove default values from `--output-values-from`
Co-authored-by: Martyn Ranyard <iMartyn@users.noreply.github.com>
Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com>
Supported comment formats is:
- jsdoc, c or java-like multi-line comment `/** **/`
BREAKING CHANGE: - In the JSON format respone, module "Comment" has been renamed to module `header`.
Supported comment formats are:
- multi-lines start with `#` comment format
- multi-lines start with `//` comment format
Unsupported comments formats is:
- jsdoc, c or java-like multi-line comment `/** **/`
* Show 'providers' information
* Fix for unsorted providers list
BREAKING CHANGE: - With Terraform 0.12 the information about `providers` being used in the module will be generated by default. This will cause the first generation of documents with the latest release of `terraform-docs` binary be slightly different than before, now there will be `Providers` section in Markdown and `providers` block in JSON. You can ignore this by using new `--no-providers` flag if you choose to.
Originally-Authored-By: Thomas Alton <thomas.alton@gmail.com>
Original-Pull-Request: #113
* Support 0.12 configuration
* Move code out of GOPATH for CircleCI
* cleanup
* Rename 'variables' back to 'input' just for now
* Normalizing 'print.s.Settings' usage
* Normalize settings continued
* Remove '--providers' functionality for now
* Adjust 'commands' based on moarta's changes
* Adjust 'pkg/doc' based on moarta's changes
* Adjust 'pkg/print/json' based on moarta's changes
* Fix json tests
* don't trim whitespaces from .tf files
* Adjust 'pkg/print/pretty' based on moarta's changes
* Fix pretty tests
* don't trim whitespaces from .golden files
* Show 'n/a' for empty description for 'pretty'
* Show 'any' if type of input variable is missing
* Adjust 'pkg/print/markdown/document' based on moarta's changes
* Fix document tests
* move back vendor files
* Adjust 'pkg/print/markdown/table' based on moarta's changes
* fix lint issue
* Fix table tests
* figure out input type based on default value if tpye not explicitly defined
* don't escape ( ) [ ] { }, as they don't cause any issue
Authored-by: Thomas Alton <thomas.alton@gmail.com>
Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com>
* HTML-ize code blocks inside a markdown table. Single line break.
Add support for embedding markdown code blocks inside markdown tables
Add support for single-line breaks: when the line ends with 2 spaces, place
a single <br>.
* Fix the testsuite, todo improve the escape code for document
* Add the WithIndent testdata