Description
Without a variable description, users may not know what value to supply or when to change the default.
Potential impact
Misunderstanding the variable can lead to incorrect settings or repeated support questions.
Remediation
Add a description to each variable explaining its purpose and expected values. Configure validation separately when value restrictions must be enforced.
Examples
The examples describe a cluster-name variable while retaining its name, type, and default value.
Before
hcl
variable "cluster_name" {
type = string
default = "example"
}
After
hcl
variable "cluster_name" {
type = string
default = "example"
description = "Name of the Kubernetes cluster to create"
}