Description
Without a description on an output, module users may have to infer the value’s purpose and format from code. This is a documentation and maintenance issue.
Potential impact
The output may be used incorrectly or cause confusion during module handover.
Remediation
Add a description to each output explaining its meaning and intended use. Include units or format where relevant.
Examples
The examples describe an EKS cluster-name output. The referenced cluster resource is omitted.
Before
hcl
output "cluster_name" {
value = aws_eks_cluster.main.name
}
After
hcl
output "cluster_name" {
value = aws_eks_cluster.main.name
description = "Name of the created EKS cluster"
}