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

Improve resource naming #208

Closed
xescugc opened this issue Jul 26, 2021 · 0 comments · Fixed by #211
Closed

Improve resource naming #208

xescugc opened this issue Jul 26, 2021 · 0 comments · Fixed by #211
Assignees
Labels
Feature roadmap feature Type: Enhancement Provide a new feature or improve an existing one

Comments

@xescugc
Copy link
Member

xescugc commented Jul 26, 2021

Abstract

Right now the logic for the names of the resources is the following:

  • tag.Name
  • id
  • Random alphanumeric value of length 5

For each of those we test if it's a valid name for a resource and if not we fallback to the next one. A good idea would be that if the tag.Name has a value, try to remove/alter it to fit into the Terraform validation of a resource name, so it would be much more readable.

Proposal

Have a way to remove the invalid characters of a potential resource name to make it more readable for the end user

Implementation

I would say that having a regexp that matches all those invalid charaters and try to remove them directly.

Open issues (if applicable)

@xescugc xescugc added Type: Enhancement Provide a new feature or improve an existing one Feature roadmap feature labels Jul 26, 2021
@xescugc xescugc self-assigned this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature roadmap feature Type: Enhancement Provide a new feature or improve an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant