def get_resource_name(prefix, project_name):
  """Get a name that can be used for GCE resources."""
  # https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers
  max_name_length = 58

  project_name = project_name.lower().replace('_', '-')
  name = prefix + '-' + project_name
  return name[:max_name_length]