getCluster

Retrieve information about an EKS Cluster.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.eks.EksFunctions;
import com.pulumi.aws.eks.inputs.GetClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = EksFunctions.getCluster(GetClusterArgs.builder()
.name("example")
.build());
ctx.export("endpoint", example.applyValue(getClusterResult -> getClusterResult.endpoint()));
ctx.export("kubeconfig-certificate-authority-data", example.applyValue(getClusterResult -> getClusterResult.certificateAuthorities()[0].data()));
ctx.export("identity-oidc-issuer", example.applyValue(getClusterResult -> getClusterResult.identities()[0].oidcs()[0].issuer()));
}
}

Return

A collection of values returned by getCluster.

Parameters

argument

A collection of arguments for invoking getCluster.


suspend fun getCluster(name: String, tags: Map<String, String>? = null): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

name

Name of the cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (^[0-9A-Za-z][A-Za-z0-9\-_]+$).

tags

Key-value map of resource tags.

See also


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

Return

A collection of values returned by getCluster.

Parameters

argument

Builder for com.pulumi.aws.eks.kotlin.inputs.GetClusterPlainArgs.

See also