» google_game_services_game_server_cluster

A game server cluster resource.

To get more information about GameServerCluster, see:

» Example Usage - Game Service Cluster Basic

resource "google_game_services_game_server_cluster" "default" {
  provider   = google-beta

  cluster_id = ""
  realm_id   = google_game_services_realm.default.realm_id

  connection_info {
    gke_cluster_reference {
      cluster = "locations/us-west1/clusters/%{agones_cluster}"
    }
    namespace = "default"
  }
}

resource "google_game_services_realm" "default" {
  provider = google-beta

  realm_id   = "realm"
  time_zone  = "PST8PDT"

  description = "Test Game Realm"
}

» Argument Reference

The following arguments are supported:

  • cluster_id - (Required) Required. The resource name of the game server cluster

  • realm_id - (Required) The realm id of the game server realm.

  • connection_info - (Required) Game server cluster connection information. This information is used to manage game server clusters. Structure is documented below.

The connection_info block supports:

  • gke_cluster_reference - (Required) Reference of the GKE cluster where the game servers are installed. Structure is documented below.

  • namespace - (Required) Namespace designated on the game server cluster where the game server instances will be created. The namespace existence will be validated during creation.

The gke_cluster_reference block supports:


  • location - (Optional) Location of the Cluster.

  • labels - (Optional) The labels associated with this game server cluster. Each label is a key-value pair.

  • description - (Optional) Human readable description of the cluster.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

» Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/{{location}}/realms/{{realm_id}}/gameServerClusters/{{cluster_id}}

  • name - The resource id of the game server cluster, eg: projects/{project_id}/locations/{location}/realms/{realm_id}/gameServerClusters/{cluster_id}. For example, projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster.

» Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • update - Default is 4 minutes.
  • delete - Default is 4 minutes.

» Import

GameServerCluster can be imported using any of these accepted formats:

$ terraform import -provider=google-beta google_game_services_game_server_cluster.default projects/{{project}}/locations/{{location}}/realms/{{realm_id}}/gameServerClusters/{{name}}
$ terraform import -provider=google-beta google_game_services_game_server_cluster.default {{project}}/{{location}}/{{realm_id}}/{{name}}
$ terraform import -provider=google-beta google_game_services_game_server_cluster.default {{location}}/{{realm_id}}/{{name}}

» User Project Overrides

This resource supports User Project Overrides.