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

Refactor entity IDs and prefixes #507

Open
zpatrick opened this issue Jan 18, 2018 · 2 comments
Open

Refactor entity IDs and prefixes #507

zpatrick opened this issue Jan 18, 2018 · 2 comments
Milestone

Comments

@zpatrick
Copy link
Contributor

zpatrick commented Jan 18, 2018

We could change the client and api package to always communicate with fully-qualified entity ids. This could help simplify the provider/aws package tremendously. If we wanted, users could still only be exposed to unqualified ids (e.g. the l0 cli will strip the l0-<instance>- prefix), but any call made to/from the API would communicate with fully-qualified ids.

We could also investigate removing random hashes for IDs. This has some pros and cons:

  • PRO: Each entity would be human-readable both on layer0 and on the aws console
  • PRO: We could remove a lot of name<->id lookups from the tag database (we can't remove them entirely; we would need to keep things like task arn->id mappings).
  • CON: Users would be limited (somewhat dramatically) by the length and name requirements they can use for entities. For example, load balancer names are restricted to something like 23 characters. With the layer0 prefix, this becomes even smaller.
  • CON: Tag resolving from the CLI, e.g. l0 entity get foo* would need be significantly changed. If we kept it, most likely we would need to call the List command for the specified entity first (which could be expensive).

However, we could investigate using aws tags to fill in the gaps. We may be at the point where each entity created by Layer0 has aws-supported tags.

@zpatrick zpatrick added this to the v1.0.0 milestone Jan 18, 2018
@diemonster
Copy link
Contributor

diemonster commented Jan 19, 2018

Re: CONs

  • ELB names can be 32 characters. But as you pointed out re: aws tags, it seems like we could use them to fill the gap here.
  • Could we consider using AWS' new tag api to do lookups? It's available in the SDK and covers things like EC2 instances, ELBs, etc: https://aws.amazon.com/blogs/aws/new-aws-resource-tagging-api/

https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/Welcome.html

@tribaljack
Copy link
Collaborator

Investigation for v0.11.0

@tribaljack tribaljack modified the milestones: v1.0.0, v0.11.0 Jan 22, 2018
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

3 participants