Hacker News new | ask | show | jobs
by ukoki 1797 days ago
Resource types in the name is a pet peeve of mine. They should not be part of the name. An RDS instance can never be anything other than a database, no need for 'database' or 'db' or 'rds' in the name. Likewise a Kubernetes cluster can never be anything other than a k8s cluster. It doesn't need 'cluster' suffix.

Terraform makes this redundancy especially obvious because you already include the type in any references to resources eg.

google_container_cluster.payments_cluster.something

4 comments

I swear some companies do this out of some perverse habit: one place I worked at used to prefix repos, internal modules, infrastructure names, etc with the name of the company.

Which was so frustrating because we all work here, we know what it’s called, it doesn’t add anything, there’s no sister-company we share resources with, all it does is make it harder to distinguish between 2 similarly named, but entirely too long internal applications.

I worked with a company that did this as well - they even went as far as prefixing their _slack_ channels with $(companyName)…
I cannot agree on this more. Also things you should never put in the name of a resource: its provider. I mean, why do you want to put in every Google Cloud resource the GGL prefix? And last, if we are talking cloud let use tags to describe most of the useful metadata and make them 1St class citizens, although the name will always stand out more.
I had the impression, the types get in the name exactly because they can't change.
How do you feel about Hungarian notation?
Possibly useful in dynamically typed languages. Definitely not useful at all in statically typed languages. And cloud resources are equivalent to statically typed - you cant turn an EC2 instance into an Elastic Load Balancer, for instance -- it's only ever one or the other.