Key & Value
1. Case
lowercase
Lower case is the safest and simplest strategy. No providers restricts the use of lowercase letters.
However the legibility of compound names can be poor. One solution is to add word separators. In this case, to maintain consistency, you will have to use this separator on each of your compound words, even the simplest ones.
Camel case (PascalCase || dromedaryCase)
Some provider like GCP does not allow any uppercase in key or values.
UPPERCASE
No. Do NOT use full upercase.
About acronyms
You must also choose whether or not to keep acronyms in uppercase. If you choose to accept uppercase acronyms, their use with CamelCase may be illegible as is the case in lowercase. Adding a separator in addition to upper case to handle uppercase acronyms is unmanageable.
2. Separators
I distinguish 4 types of separators :
Compound words
nodepoo
Word separator
aks-pzkvig13g1-14517300-1
Scope separator
Norm separator
Compound words : _ (underscore)
JSON compliance
Words separator : - (dash)
Simple
Scope separator : . (dot)
Follow DNS principles
Norm separator : / (slash)
Clear separator, parsing is simple
Your choice must be made taking into account the tagging constraints imposed by your providers.
space / - _ .
3. Language
If English is not the official language of your organization, you must choose between your current language and the standard that is English. English has the advantage of not having accented characters. Despite the existence of UTF8, the handling of these non-ASCII characters can be a source of encoding problems.
Avoid Misspelling
If you have chosen English as your tagging language: pay attention to the very close spelling between your language and English.
For example (French vs English) :
4. Complete names or abbreviation
For the few widely adopted, long and unambiguous name (eg: env, bu): abbreviation
Others : complete names
The abbreviation of the tag names must serve a practical purpose.
Long names are prone to typos
It's easier to request keys with short names eg : env vs environnement
Useful if char length is limited
Last updated