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

Add variable for name separator instead of hardcoded hifen #217

Closed
thiagonache opened this issue Dec 16, 2021 · 3 comments
Closed

Add variable for name separator instead of hardcoded hifen #217

thiagonache opened this issue Dec 16, 2021 · 3 comments
Labels
enhancement New feature or request P3 medium priority issues triaged Scoped and ready for work

Comments

@thiagonache
Copy link
Contributor

thiagonache commented Dec 16, 2021

TL;DR

I'd like to set a different separator when adding suffix to the hostname to compose the name abc-y001.

Terraform Resources

[GCP Compute Instance](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance)

Detailed design

When the variable add_hostname_suffix is true it's going to compose the name as per this line of code:
var.add_hostname_suffix ? "${local.hostname}-${format("%03d", count.index + 1)}" : local.hostname
On my use case I want abc-y001, so I'd use the name abc-y and a blank separator.

Please, let me know if you would accept such behavior or if you have any better Idea too.

Additional information

I can work in the PR but I just would like to know if you guys are interested in the behavior.

@thiagonache thiagonache added the enhancement New feature or request label Dec 16, 2021
@morgante
Copy link
Contributor

I think we could accept a PR adding this as a variable.

@morgante morgante added P3 medium priority issues triaged Scoped and ready for work labels Dec 16, 2021
@thiagonache
Copy link
Contributor Author

thiagonache commented Dec 16, 2021 via email

@thiagonache
Copy link
Contributor Author

we can close this one, can't we?

@morgante morgante closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 medium priority issues triaged Scoped and ready for work
Projects
None yet
Development

No branches or pull requests

2 participants