You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a heavy user of this module for naming resources, but often find myself writing workarounds for limiting the length of the output ID. Many resources have a max allowed length of the names (such as aws_lb and aws_alb_target_group (32 characters), aws_iam_role (64 characters) etc.
It would be really nice to have an input parameter max_id_length capping the output ID, while still keeping it unique. Suggested implementation:
@tibbing yes, this has come up quite a bit. We would accept a PR for this functionality. I like your proposal of offering a few different kinds of outputs. I'd maybe call id_capped instead id_truncated or id_short. Let's call id_hash just id_md5 since there are multiple ways to hash.
@osterman Good points! Please see the referenced PR. I was considering whether to use the given delimiter, or force a dash before the hash, or even skip it altogether. We just need to make sure there won't be duplicate delimiters if the ID happens to be truncated just after a delimiter somehow. Do you have any preference?
I'm a heavy user of this module for naming resources, but often find myself writing workarounds for limiting the length of the output ID. Many resources have a max allowed length of the names (such as
aws_lb
andaws_alb_target_group
(32 characters),aws_iam_role
(64 characters) etc.It would be really nice to have an input parameter
max_id_length
capping the output ID, while still keeping it unique. Suggested implementation:I can give it a go and make a PR if you like the idea.
The text was updated successfully, but these errors were encountered: