1. Packages
  2. AWS
  3. API Docs
  4. eks
  5. getClusterVersions
AWS v7.4.0 published on Wednesday, Aug 13, 2025 by Pulumi

aws.eks.getClusterVersions

Explore with Pulumi AI

aws logo
AWS v7.4.0 published on Wednesday, Aug 13, 2025 by Pulumi

    Data source for managing AWS EKS (Elastic Kubernetes) Cluster Versions.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.eks.getClusterVersions({});
    export const eksClusterVersions = example.then(example => example.clusterVersions);
    export const eksClusterVersionFiltered = example.then(example => .filter(version => version.clusterVersion == "1.33").map(version => (version)));
    export const eksClusterVersionList = example.then(example => .map(version => (version.clusterVersion)));
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.eks.get_cluster_versions()
    pulumi.export("eksClusterVersions", example.cluster_versions)
    pulumi.export("eksClusterVersionFiltered", [version for version in example.cluster_versions if version.cluster_version == "1.33"])
    pulumi.export("eksClusterVersionList", [version.cluster_version for version in example.cluster_versions])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Eks.GetClusterVersions.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["eksClusterVersions"] = example.Apply(getClusterVersionsResult => getClusterVersionsResult.ClusterVersions),
            ["eksClusterVersionFiltered"] = .Where(version => version.ClusterVersion == "1.33").Select(version => 
            {
                return version;
            }).ToList(),
            ["eksClusterVersionList"] = .Select(version => 
            {
                return version.ClusterVersion;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Filter by Cluster Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.eks.getClusterVersions({
        clusterType: "eks",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.eks.get_cluster_versions(cluster_type="eks")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/eks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eks.GetClusterVersions(ctx, &eks.GetClusterVersionsArgs{
    			ClusterType: pulumi.StringRef("eks"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Eks.GetClusterVersions.Invoke(new()
        {
            ClusterType = "eks",
        });
    
    });
    
    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.GetClusterVersionsArgs;
    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.getClusterVersions(GetClusterVersionsArgs.builder()
                .clusterType("eks")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:eks:getClusterVersions
          arguments:
            clusterType: eks
    

    Filter by Version Status

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.eks.getClusterVersions({
        versionStatus: "STANDARD_SUPPORT",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.eks.get_cluster_versions(version_status="STANDARD_SUPPORT")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/eks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eks.GetClusterVersions(ctx, &eks.GetClusterVersionsArgs{
    			VersionStatus: pulumi.StringRef("STANDARD_SUPPORT"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Eks.GetClusterVersions.Invoke(new()
        {
            VersionStatus = "STANDARD_SUPPORT",
        });
    
    });
    
    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.GetClusterVersionsArgs;
    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.getClusterVersions(GetClusterVersionsArgs.builder()
                .versionStatus("STANDARD_SUPPORT")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:eks:getClusterVersions
          arguments:
            versionStatus: STANDARD_SUPPORT
    

    Using getClusterVersions

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getClusterVersions(args: GetClusterVersionsArgs, opts?: InvokeOptions): Promise<GetClusterVersionsResult>
    function getClusterVersionsOutput(args: GetClusterVersionsOutputArgs, opts?: InvokeOptions): Output<GetClusterVersionsResult>
    def get_cluster_versions(cluster_type: Optional[str] = None,
                             cluster_versions_onlies: Optional[Sequence[str]] = None,
                             default_only: Optional[bool] = None,
                             include_all: Optional[bool] = None,
                             region: Optional[str] = None,
                             version_status: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetClusterVersionsResult
    def get_cluster_versions_output(cluster_type: Optional[pulumi.Input[str]] = None,
                             cluster_versions_onlies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             default_only: Optional[pulumi.Input[bool]] = None,
                             include_all: Optional[pulumi.Input[bool]] = None,
                             region: Optional[pulumi.Input[str]] = None,
                             version_status: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetClusterVersionsResult]
    func GetClusterVersions(ctx *Context, args *GetClusterVersionsArgs, opts ...InvokeOption) (*GetClusterVersionsResult, error)
    func GetClusterVersionsOutput(ctx *Context, args *GetClusterVersionsOutputArgs, opts ...InvokeOption) GetClusterVersionsResultOutput

    > Note: This function is named GetClusterVersions in the Go SDK.

    public static class GetClusterVersions 
    {
        public static Task<GetClusterVersionsResult> InvokeAsync(GetClusterVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterVersionsResult> Invoke(GetClusterVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterVersionsResult> getClusterVersions(GetClusterVersionsArgs args, InvokeOptions options)
    public static Output<GetClusterVersionsResult> getClusterVersions(GetClusterVersionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:eks/getClusterVersions:getClusterVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    ClusterVersionsOnlies List<string>
    DefaultOnly bool
    Whether to show only the default versions of Kubernetes supported by EKS.
    IncludeAll bool
    Whether to include all kubernetes versions in the response.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VersionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    ClusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    ClusterVersionsOnlies []string
    DefaultOnly bool
    Whether to show only the default versions of Kubernetes supported by EKS.
    IncludeAll bool
    Whether to include all kubernetes versions in the response.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VersionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType String
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersionsOnlies List<String>
    defaultOnly Boolean
    Whether to show only the default versions of Kubernetes supported by EKS.
    includeAll Boolean
    Whether to include all kubernetes versions in the response.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    versionStatus String
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersionsOnlies string[]
    defaultOnly boolean
    Whether to show only the default versions of Kubernetes supported by EKS.
    includeAll boolean
    Whether to include all kubernetes versions in the response.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    versionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    cluster_type str
    Type of clusters to filter by. Currently, the only valid value is eks.
    cluster_versions_onlies Sequence[str]
    default_only bool
    Whether to show only the default versions of Kubernetes supported by EKS.
    include_all bool
    Whether to include all kubernetes versions in the response.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    version_status str
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType String
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersionsOnlies List<String>
    defaultOnly Boolean
    Whether to show only the default versions of Kubernetes supported by EKS.
    includeAll Boolean
    Whether to include all kubernetes versions in the response.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    versionStatus String
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.

    getClusterVersions Result

    The following output properties are available:

    ClusterVersions List<GetClusterVersionsClusterVersion>
    A list of Kubernetes version information.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    ClusterType string
    Type of cluster that the version belongs to.
    ClusterVersionsOnlies List<string>
    DefaultOnly bool
    IncludeAll bool
    VersionStatus string
    Status of the EKS cluster version.
    ClusterVersions []GetClusterVersionsClusterVersion
    A list of Kubernetes version information.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    ClusterType string
    Type of cluster that the version belongs to.
    ClusterVersionsOnlies []string
    DefaultOnly bool
    IncludeAll bool
    VersionStatus string
    Status of the EKS cluster version.
    clusterVersions List<GetClusterVersionsClusterVersion>
    A list of Kubernetes version information.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    clusterType String
    Type of cluster that the version belongs to.
    clusterVersionsOnlies List<String>
    defaultOnly Boolean
    includeAll Boolean
    versionStatus String
    Status of the EKS cluster version.
    clusterVersions GetClusterVersionsClusterVersion[]
    A list of Kubernetes version information.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    clusterType string
    Type of cluster that the version belongs to.
    clusterVersionsOnlies string[]
    defaultOnly boolean
    includeAll boolean
    versionStatus string
    Status of the EKS cluster version.
    cluster_versions Sequence[GetClusterVersionsClusterVersion]
    A list of Kubernetes version information.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    cluster_type str
    Type of cluster that the version belongs to.
    cluster_versions_onlies Sequence[str]
    default_only bool
    include_all bool
    version_status str
    Status of the EKS cluster version.
    clusterVersions List<Property Map>
    A list of Kubernetes version information.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    clusterType String
    Type of cluster that the version belongs to.
    clusterVersionsOnlies List<String>
    defaultOnly Boolean
    includeAll Boolean
    versionStatus String
    Status of the EKS cluster version.

    Supporting Types

    GetClusterVersionsClusterVersion

    ClusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    ClusterVersion string
    Kubernetes version supported by EKS.
    DefaultPlatformVersion string
    Default eks platform version for the cluster version.
    DefaultVersion bool
    Default Kubernetes version for the cluster version.
    EndOfExtendedSupportDate string
    End of extended support date for the cluster version.
    EndOfStandardSupportDate string
    End of standard support date for the cluster version.
    KubernetesPatchVersion string
    Kubernetes patch version for the cluster version.
    ReleaseDate string
    Release date of the cluster version.
    VersionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    ClusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    ClusterVersion string
    Kubernetes version supported by EKS.
    DefaultPlatformVersion string
    Default eks platform version for the cluster version.
    DefaultVersion bool
    Default Kubernetes version for the cluster version.
    EndOfExtendedSupportDate string
    End of extended support date for the cluster version.
    EndOfStandardSupportDate string
    End of standard support date for the cluster version.
    KubernetesPatchVersion string
    Kubernetes patch version for the cluster version.
    ReleaseDate string
    Release date of the cluster version.
    VersionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType String
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersion String
    Kubernetes version supported by EKS.
    defaultPlatformVersion String
    Default eks platform version for the cluster version.
    defaultVersion Boolean
    Default Kubernetes version for the cluster version.
    endOfExtendedSupportDate String
    End of extended support date for the cluster version.
    endOfStandardSupportDate String
    End of standard support date for the cluster version.
    kubernetesPatchVersion String
    Kubernetes patch version for the cluster version.
    releaseDate String
    Release date of the cluster version.
    versionStatus String
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType string
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersion string
    Kubernetes version supported by EKS.
    defaultPlatformVersion string
    Default eks platform version for the cluster version.
    defaultVersion boolean
    Default Kubernetes version for the cluster version.
    endOfExtendedSupportDate string
    End of extended support date for the cluster version.
    endOfStandardSupportDate string
    End of standard support date for the cluster version.
    kubernetesPatchVersion string
    Kubernetes patch version for the cluster version.
    releaseDate string
    Release date of the cluster version.
    versionStatus string
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    cluster_type str
    Type of clusters to filter by. Currently, the only valid value is eks.
    cluster_version str
    Kubernetes version supported by EKS.
    default_platform_version str
    Default eks platform version for the cluster version.
    default_version bool
    Default Kubernetes version for the cluster version.
    end_of_extended_support_date str
    End of extended support date for the cluster version.
    end_of_standard_support_date str
    End of standard support date for the cluster version.
    kubernetes_patch_version str
    Kubernetes patch version for the cluster version.
    release_date str
    Release date of the cluster version.
    version_status str
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.
    clusterType String
    Type of clusters to filter by. Currently, the only valid value is eks.
    clusterVersion String
    Kubernetes version supported by EKS.
    defaultPlatformVersion String
    Default eks platform version for the cluster version.
    defaultVersion Boolean
    Default Kubernetes version for the cluster version.
    endOfExtendedSupportDate String
    End of extended support date for the cluster version.
    endOfStandardSupportDate String
    End of standard support date for the cluster version.
    kubernetesPatchVersion String
    Kubernetes patch version for the cluster version.
    releaseDate String
    Release date of the cluster version.
    versionStatus String
    Status of the EKS cluster versions to list. Valid values are STANDARD_SUPPORT or UNSUPPORTED or EXTENDED_SUPPORT.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.4.0 published on Wednesday, Aug 13, 2025 by Pulumi