Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-consider instance naming pattern #82

Closed
lukehoban opened this issue Dec 19, 2018 · 1 comment
Closed

Re-consider instance naming pattern #82

lukehoban opened this issue Dec 19, 2018 · 1 comment
Assignees
Milestone

Comments

@lukehoban
Copy link
Member

We've adopted a pattern of using the name instance to refer to the raw resource that is morally the key thing wrapped by a higher level component in this library - like awsinfra.ecs.Cluster#instance will return the aws.ecs.Cluster.

This was done to avoid stuttering like cluster.cluster in common cases.

However, I would suggest that it is better to go with the cluster.cluster approach for a variety of reasons. It's not perfect, but I believe on balance it's the best option.

  1. Typically this is just one of several underlying resources being managed, and although its the “main” one, it’s awkward to name it differently. Everything else is securityGroup, or subnet, but then the cluster is instance.
  2. We've consistently seen everyone initially go with the cluster.cluster style naming by default, since it is the most natural option - and I think anything else is likely to not be adopted broadly enough.
  3. The repetition just isn't that bad, and actually has a level of simple clarity to it - it's likely to be more discoverable and usable than alternatives.
@CyrusNajmabadi
Copy link
Contributor

@lukehoban Sounds good. I've added this to the list in #53 and i'm closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants