Add variable for name separator instead of hardcoded hifen
Closed this issue · 3 comments
thiagonache commented
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.
morgante commented
I think we could accept a PR adding this as a variable.
thiagonache commented
Cool. I’ll work on it. Thank you!
… On 16 Dec 2021, at 19:44, Morgante Pell ***@***.***> wrote:
I think we could accept a PR adding this as a variable.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
thiagonache commented
we can close this one, can't we?