get Kubernetes Service Versions
suspend fun getKubernetesServiceVersions(argument: GetKubernetesServiceVersionsPlainArgs): GetKubernetesServiceVersionsResult
Use this data source to retrieve the version of Kubernetes supported by Azure Kubernetes Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.containerservice.getKubernetesServiceVersions({
location: "West Europe",
});
export const versions = current.then(current => current.versions);
export const latestVersion = current.then(current => current.latestVersion);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
current = azure.containerservice.get_kubernetes_service_versions(location="West Europe")
pulumi.export("versions", current.versions)
pulumi.export("latestVersion", current.latest_version)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var current = Azure.ContainerService.GetKubernetesServiceVersions.Invoke(new()
{
Location = "West Europe",
});
return new Dictionary<string, object?>
{
["versions"] = current.Apply(getKubernetesServiceVersionsResult => getKubernetesServiceVersionsResult.Versions),
["latestVersion"] = current.Apply(getKubernetesServiceVersionsResult => getKubernetesServiceVersionsResult.LatestVersion),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := containerservice.GetKubernetesServiceVersions(ctx, &containerservice.GetKubernetesServiceVersionsArgs{
Location: "West Europe",
}, nil)
if err != nil {
return err
}
ctx.Export("versions", current.Versions)
ctx.Export("latestVersion", current.LatestVersion)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.containerservice.ContainerserviceFunctions;
import com.pulumi.azure.containerservice.inputs.GetKubernetesServiceVersionsArgs;
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 current = ContainerserviceFunctions.getKubernetesServiceVersions(GetKubernetesServiceVersionsArgs.builder()
.location("West Europe")
.build());
ctx.export("versions", current.applyValue(getKubernetesServiceVersionsResult -> getKubernetesServiceVersionsResult.versions()));
ctx.export("latestVersion", current.applyValue(getKubernetesServiceVersionsResult -> getKubernetesServiceVersionsResult.latestVersion()));
}
}
Content copied to clipboard
variables:
current:
fn::invoke:
function: azure:containerservice:getKubernetesServiceVersions
arguments:
location: West Europe
outputs:
versions: ${current.versions}
latestVersion: ${current.latestVersion}
Content copied to clipboard
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
argument
A collection of arguments for invoking getKubernetesServiceVersions.
suspend fun getKubernetesServiceVersions(includePreview: Boolean? = null, location: String, versionPrefix: String? = null): GetKubernetesServiceVersionsResult
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
include Preview
Should Preview versions of Kubernetes in AKS be included? Defaults to true
location
Specifies the location in which to query for versions.
version Prefix
A prefix filter for the versions of Kubernetes which should be returned; for example 1.
will return 1.9
to 1.14
, whereas 1.12
will return 1.12.2
.
See also
suspend fun getKubernetesServiceVersions(argument: suspend GetKubernetesServiceVersionsPlainArgsBuilder.() -> Unit): GetKubernetesServiceVersionsResult
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
argument
Builder for com.pulumi.azure.containerservice.kotlin.inputs.GetKubernetesServiceVersionsPlainArgs.