1. Packages
  2. Linode Provider
  3. API Docs
  4. getLkeVersions
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.getLkeVersions

Explore with Pulumi AI

Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

Provides details about the Kubernetes versions available for deployment to a Kubernetes cluster. For more information, see the Linode APIv4 docs.

Example Usage

The following example shows how one might use this data source to access information about a Linode LKE Version.

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const example = linode.getLkeVersions({});
export const exampleOutput = example;
export const exampleOutputFirstVersion = example.then(example => example.versions?.[0]);
Copy
import pulumi
import pulumi_linode as linode

example = linode.get_lke_versions()
pulumi.export("exampleOutput", example)
pulumi.export("exampleOutputFirstVersion", example.versions[0])
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := linode.GetLkeVersions(ctx, &linode.GetLkeVersionsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleOutput", example)
		ctx.Export("exampleOutputFirstVersion", example.Versions[0])
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var example = Linode.GetLkeVersions.Invoke();

    return new Dictionary<string, object?>
    {
        ["exampleOutput"] = example,
        ["exampleOutputFirstVersion"] = example.Apply(getLkeVersionsResult => getLkeVersionsResult.Versions[0]),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetLkeVersionsArgs;
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 = LinodeFunctions.getLkeVersions(GetLkeVersionsArgs.builder()
            .build());

        ctx.export("exampleOutput", example);
        ctx.export("exampleOutputFirstVersion", example.versions()[0]);
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: linode:getLkeVersions
      arguments: {}
outputs:
  exampleOutput: ${example}
  exampleOutputFirstVersion: ${example.versions[0]}
Copy

The following example shows how one might use this data source to access information about a Linode LKE Version with additional information about the Linode LKE Version’s tier (enterprise or standard).

NOTE: This functionality may not be currently available to all users and can only be used with v4beta.

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const exampleEnterprise = linode.getLkeVersions({
    tier: "enterprise",
});
export const exampleEnterpriseOutput = exampleEnterprise;
export const exampleEnterpriseOutputFirstVersion = exampleEnterprise.then(exampleEnterprise => exampleEnterprise.versions?.[0]);
Copy
import pulumi
import pulumi_linode as linode

example_enterprise = linode.get_lke_versions(tier="enterprise")
pulumi.export("exampleEnterpriseOutput", example_enterprise)
pulumi.export("exampleEnterpriseOutputFirstVersion", example_enterprise.versions[0])
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleEnterprise, err := linode.GetLkeVersions(ctx, &linode.GetLkeVersionsArgs{
			Tier: pulumi.StringRef("enterprise"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleEnterpriseOutput", exampleEnterprise)
		ctx.Export("exampleEnterpriseOutputFirstVersion", exampleEnterprise.Versions[0])
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var exampleEnterprise = Linode.GetLkeVersions.Invoke(new()
    {
        Tier = "enterprise",
    });

    return new Dictionary<string, object?>
    {
        ["exampleEnterpriseOutput"] = exampleEnterprise,
        ["exampleEnterpriseOutputFirstVersion"] = exampleEnterprise.Apply(getLkeVersionsResult => getLkeVersionsResult.Versions[0]),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetLkeVersionsArgs;
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 exampleEnterprise = LinodeFunctions.getLkeVersions(GetLkeVersionsArgs.builder()
            .tier("enterprise")
            .build());

        ctx.export("exampleEnterpriseOutput", exampleEnterprise);
        ctx.export("exampleEnterpriseOutputFirstVersion", exampleEnterprise.versions()[0]);
    }
}
Copy
variables:
  exampleEnterprise:
    fn::invoke:
      function: linode:getLkeVersions
      arguments:
        tier: enterprise
outputs:
  exampleEnterpriseOutput: ${exampleEnterprise}
  exampleEnterpriseOutputFirstVersion: ${exampleEnterprise.versions[0]}
Copy

Using getLkeVersions

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 getLkeVersions(args: GetLkeVersionsArgs, opts?: InvokeOptions): Promise<GetLkeVersionsResult>
function getLkeVersionsOutput(args: GetLkeVersionsOutputArgs, opts?: InvokeOptions): Output<GetLkeVersionsResult>
Copy
def get_lke_versions(tier: Optional[str] = None,
                     versions: Optional[Sequence[GetLkeVersionsVersion]] = None,
                     opts: Optional[InvokeOptions] = None) -> GetLkeVersionsResult
def get_lke_versions_output(tier: Optional[pulumi.Input[str]] = None,
                     versions: Optional[pulumi.Input[Sequence[pulumi.Input[GetLkeVersionsVersionArgs]]]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetLkeVersionsResult]
Copy
func GetLkeVersions(ctx *Context, args *GetLkeVersionsArgs, opts ...InvokeOption) (*GetLkeVersionsResult, error)
func GetLkeVersionsOutput(ctx *Context, args *GetLkeVersionsOutputArgs, opts ...InvokeOption) GetLkeVersionsResultOutput
Copy

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

public static class GetLkeVersions 
{
    public static Task<GetLkeVersionsResult> InvokeAsync(GetLkeVersionsArgs args, InvokeOptions? opts = null)
    public static Output<GetLkeVersionsResult> Invoke(GetLkeVersionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLkeVersionsResult> getLkeVersions(GetLkeVersionsArgs args, InvokeOptions options)
public static Output<GetLkeVersionsResult> getLkeVersions(GetLkeVersionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: linode:index/getLkeVersions:getLkeVersions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Tier string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
Versions List<GetLkeVersionsVersion>
Tier string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
Versions []GetLkeVersionsVersion
tier String
The tier (standard or enterprise) of Linode LKE Versions to fetch.
versions List<GetLkeVersionsVersion>
tier string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
versions GetLkeVersionsVersion[]
tier str
The tier (standard or enterprise) of Linode LKE Versions to fetch.
versions Sequence[GetLkeVersionsVersion]
tier String
The tier (standard or enterprise) of Linode LKE Versions to fetch.
versions List<Property Map>

getLkeVersions Result

The following output properties are available:

Id string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
Tier string
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
Versions List<GetLkeVersionsVersion>
Id string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
Tier string
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
Versions []GetLkeVersionsVersion
id String
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier String
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
versions List<GetLkeVersionsVersion>
id string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier string
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
versions GetLkeVersionsVersion[]
id str
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier str
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
versions Sequence[GetLkeVersionsVersion]
id String
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier String
The Kubernetes version tier. Only exported if tier was provided when using the datasource.
versions List<Property Map>

Supporting Types

GetLkeVersionsVersion

Id This property is required. string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
Tier This property is required. string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
Id This property is required. string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
Tier This property is required. string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
id This property is required. String
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier This property is required. String
The tier (standard or enterprise) of Linode LKE Versions to fetch.
id This property is required. string
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier This property is required. string
The tier (standard or enterprise) of Linode LKE Versions to fetch.
id This property is required. str
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier This property is required. str
The tier (standard or enterprise) of Linode LKE Versions to fetch.
id This property is required. String
The Kubernetes version numbers available for deployment to a Kubernetes cluster in the format of [major].[minor], and the latest supported patch version.
tier This property is required. String
The tier (standard or enterprise) of Linode LKE Versions to fetch.

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi