-
Notifications
You must be signed in to change notification settings - Fork 565
Closed
Description
Describe the bug
I have a variables.tf file with # some comment
and then variables definitions follow
When I generate docs, the comment is used as variable description. I want to avoid that. Is there a config setting I can use to prevent this ?
How can we reproduce it?
- Create
variables.tf
with definition
# some comment
variable "var1" {
}
- Run
▶ terraform-docs markdown --output-check --show inputs ./
Input section will be rendered.
Output is as follows:
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_var1"></a> [var1](#input\_var1) | some comment | `any` | n/a | yes |
Generated markdown:
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
var1 | some comment | any |
n/a | yes |
Desired output
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
var1 | n/a | any |
n/a | yes |
Environment information
- terraform-docs version (use
terraform-docs --version
):
▶ terraform-docs version
terraform-docs version v0.15.0 darwin/amd64
- OS (e.g. Windows, MacOS): MacOS