Show / Hide Table of Contents

Class GetCluster

Inheritance
System.Object
GetCluster
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Container
Assembly: Pulumi.Gcp.dll
Syntax
public static class GetCluster

Methods

View Source

InvokeAsync(GetClusterArgs, InvokeOptions)

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

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var myCluster = Output.Create(Gcp.Container.GetCluster.InvokeAsync(new Gcp.Container.GetClusterArgs
    {
        Name = "my-cluster",
        Location = "us-east1-a",
    }));
    this.ClusterUsername = myCluster.Apply(myCluster => myCluster.MasterAuths[0].Username);
    this.ClusterPassword = myCluster.Apply(myCluster => myCluster.MasterAuths[0].Password);
    this.Endpoint = myCluster.Apply(myCluster => myCluster.Endpoint);
    this.InstanceGroupUrls = myCluster.Apply(myCluster => myCluster.InstanceGroupUrls);
    this.NodeConfig = myCluster.Apply(myCluster => myCluster.NodeConfigs);
    this.NodePools = myCluster.Apply(myCluster => myCluster.NodePools);
}

[Output("clusterUsername")]
public Output<string> ClusterUsername { get; set; }
[Output("clusterPassword")]
public Output<string> ClusterPassword { get; set; }
[Output("endpoint")]
public Output<string> Endpoint { get; set; }
[Output("instanceGroupUrls")]
public Output<string> InstanceGroupUrls { get; set; }
[Output("nodeConfig")]
public Output<string> NodeConfig { get; set; }
[Output("nodePools")]
public Output<string> NodePools { get; set; }
}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetClusterArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetClusterResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.