github.com/wata727/tflint@v0.12.2-0.20191013070026-96dd0d36f385/docs/rules/terraform_documented_variables.md (about) 1 # terraform_documented_variables 2 3 Disallow `variable` declarations without description. 4 5 ## Example 6 7 ```hcl 8 variable "no_description" { 9 default = "value" 10 } 11 12 variable "empty_description" { 13 default = "value" 14 description = "" 15 } 16 17 variable "description" { 18 default = "value" 19 description = "This is description" 20 } 21 ``` 22 23 ``` 24 $ tflint 25 2 issue(s) found: 26 27 Notice: `no_description` variable has no description (terraform_documented_variables) 28 29 on template.tf line 1: 30 1: variable "no_description" { 31 32 Reference: https://github.com/wata727/tflint/blob/v0.11.0/docs/rules/terraform_documented_variables.md 33 34 Notice: `empty_description` variable has no description (terraform_documented_variables) 35 36 on template.tf line 5: 37 5: variable "empty_description" { 38 39 Reference: https://github.com/wata727/tflint/blob/v0.11.0/docs/rules/terraform_documented_variables.md 40 41 ``` 42 43 ## Why 44 45 Since `description` is optional value, it is not always necessary to write it. But this rule is useful if you want to force the writing of description. Especially it is useful when combined with [terraform-docs](https://github.com/segmentio/terraform-docs). 46 47 ## How To Fix 48 49 Write a description other than an empty string.