happy-area-89552
01/22/2025, 1:45 PMmodern-zebra-45309
01/22/2025, 1:56 PMgetCluster is a lookup by name and location that gives you a GetClusterResult, which is essentially a metadata object (either directly or as a Pulumi output). It allows you to get information about an existing GKE cluster.
Cluster.get requires you to know the provider ID and returns a Cluster resource that you can use in your program just like a new cluster you created, without making the cluster part of your stack like an import of the resource would.
If you want to create a resource that requires a Cluster as an input and not just its name, you'd use Cluster.get but if you're just interested in learning certain properties, getCluster is probably the way to go.little-cartoon-10569
01/22/2025, 8:38 PMgetCluster is a wrapper around the GCP SDK call. Cluster.get is part of the Pulumi SDK.happy-area-89552
02/03/2025, 6:56 AM