terraform - Controlling Compute Engine Instance Name - Stack Overflow body,.top-bar{margin-top:1.9em}
When creating a managed instance group to manage GCP Compute Engine instances, we are required to set a “base_instance_name” to which Terraform will append a four character random string to ensure the instance name is unique. See:
https://www.terraform.io/docs/providers/google/r/compute_instance_group_manager.html
Is there any way to control the instance names that are created when using a managed instance group such that the names are deterministic? The other option is can we control where in the name the four character random string is placed? In other words, can we have the string placed at the beginning of the hostname as opposed to the end? The reason I ask is that I believe this is going to cause a problem if we install wildcard SSL certificates on these instances since the wildcard must be at the beginning of the hostname.