tfvar
tfvar copied to clipboard
adding Comments to tfvars
can you add option to add comments written in variables.tf file to be printed for tfvars
eg:
# say hi
variable "hi" {
type = string
default = "hello"
}
output:
# say hi
hi = "hello"
Hi, thanks for the suggestion. Could you provide more context of the usecase of this feature and what problem are you trying to witht the comment outputs?
For long variables.tf files, containing many variable, it good to sort variables category wise based on resource we create, and put Comments as for categorising variable
so, is same can be done to variable created tfvars file, will be useful
I've given some thoughts about this. One thing we can do is to use the description of variables as a "comment" in the output.
description are good for variable , but comments can be used to categorize a group of variable