Skip to content

googleGameServicesGameServerCluster

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" {

  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" {
  realm_id   = "realm"
  time_zone  = "PST8PDT"

  description = "Test Game Realm"
}

Argument Reference

The following arguments are supported:

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

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

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

The connectionInfo block supports:

  • gkeClusterReference - (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 gkeClusterReference block supports:

  • cluster - (Required) The full or partial name of a GKE cluster, using one of the following forms:
  • projects/{projectId}/locations/{location}/clusters/{clusterId}
  • locations/{location}/clusters/{clusterId}
  • {clusterId} If project and location are not specified, the project and location of the GameServerCluster resource are used to generate the full name of the GKE cluster.

  • 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/{{realmId}}/gameServerClusters/{{clusterId}}

  • name - The resource id of the game server cluster, eg: projects/{projectId}/locations/{location}/realms/{realmId}/gameServerClusters/{clusterId}. For example, projects/myProject/locations/{location}/realms/zanzibar/gameServerClusters/myOnpremCluster.

Timeouts

This resource provides the following Timeouts configuration options:

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

Import

GameServerCluster can be imported using any of these accepted formats:

$ terraform import google_game_services_game_server_cluster.default projects/{{project}}/locations/{{location}}/realms/{{realm_id}}/gameServerClusters/{{cluster_id}}
$ terraform import google_game_services_game_server_cluster.default {{project}}/{{location}}/{{realm_id}}/{{cluster_id}}
$ terraform import google_game_services_game_server_cluster.default {{location}}/{{realm_id}}/{{cluster_id}}

User Project Overrides

This resource supports User Project Overrides.