getCluster

Get info about a GKE cluster from its name and location.

Example Usage

data "google_container_cluster" "my_cluster" {
name = "my-cluster"
location = "us-east1-a"
}
output "endpoint" {
value = data.google_container_cluster.my_cluster.endpoint
}
output "instance_group_urls" {
value = data.google_container_cluster.my_cluster.node_pool[0].instance_group_urls
}
output "node_config" {
value = data.google_container_cluster.my_cluster.node_config
}
output "node_pools" {
value = data.google_container_cluster.my_cluster.node_pool
}

Return

A collection of values returned by getCluster.

Parameters

argument

A collection of arguments for invoking getCluster.


suspend fun getCluster(location: String? = null, name: String, project: String? = null): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

location

The location (zone or region) this cluster has been created in. One of location, region, zone, or a provider-level zone must be specified.

name

The name of the cluster.

project

The project in which the resource belongs. If it is not provided, the provider project is used.

See also


suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

argument

Builder for com.pulumi.gcp.container.kotlin.inputs.GetClusterPlainArgs.

See also