Hello,
I joined an existing project with a lot of modules and I see a lot of variables name in uppercase. Is there any reason for this regarding Terraform funcionality? Some best practices?
Hello,
I joined an existing project with a lot of modules and I see a lot of variables name in uppercase. Is there any reason for this regarding Terraform funcionality? Some best practices?
Hi @normander,
For variables, resource names, and any other name used only within Terraform itself the idiomatic style is all lowercase names with words separated by underscores, like example_name
.
Sometimes names in Terraform are chosen to match an external system with different naming conventions, in which case it can be reasonable to choose names that are not all lowercase and don’t necessarily use underscores as separators.
For names that aren’t sent to external systems, which includes input variable names within Terraform, I would recommend following the idiom and using all-lowercase, underscore-separated names.