-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow reducing the suffix length appended to instance templates name_prefix #15374
Comments
We'd evaluate changing the default for all resources here as part of a major version. We don't want to add a knob, or change the format in a minor version. |
Noting that we are intending to reduce the appended suffix in |
We couldn't land on a new global UUID suffix that we felt wasn't prone to collisions. So we are keeping the current behavior for Current configs should not see the new behavior when upgrading to 6.0 unless changing the Resulting name for a |
closed with GoogleCloudPlatform/magic-modules#11448 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Instance template resources provide a great name_prefix variable that allows using instance templates effectively on top of instance group managers. From what I can observe on the Google Cloud Console (which is validated by the equivalent code) a date-like suffix is appended to the
name_prefix
so that changes to instance templates in Terraform can result in the creation of different template resources with different names.In our project we use a high number of instance groups (and corresponding templates) for which we'd like to set self-explanatory names, where ideally the instance group name is equal to the name prefix of its instance template. However, this is sometimes not possible because of the 37 characters length limitation required by the
name_prefix
. In this case, we have to come up with shorter names that feel like a hack and are not really self-explanatory.While I see the reason for the suffix to be appended, I'm wondering if it would be possible to make it configurable such that we can append a shorter suffix, leaving more characters to the
name_prefix
. For instance I see that the suffix has some format20230801144601276600000001
which contains the creation date up to seconds granularity (20230801144601
) plus an extra suffix (276600000001
). Since I don't expect in my case to create multiple instance templates with the samename_prefix
within 1 second, I would be fine having just the first part of the suffix and dropping the second one. Another idea would be to use a short hash (4-6 characters) of the instance template parameters, which would leave me with almost 60 characters usable for thename_prefix
.New or Affected Resource(s)
b/312433567
The text was updated successfully, but these errors were encountered: