get Kubernetes Service Versions
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);
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)
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),
};
});
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
})
}
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.versions());
ctx.export("latestVersion", current.latestVersion());
}
}
variables:
current:
fn::invoke:
function: azure:containerservice:getKubernetesServiceVersions
arguments:
location: West Europe
outputs:
versions: ${current.versions}
latestVersion: ${current.latestVersion}
API Providers
This data source uses the following Azure API Providers:
Microsoft.ContainerService
: 2019-08-01
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
A collection of arguments for invoking getKubernetesServiceVersions.
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
Should Preview versions of Kubernetes in AKS be included? Defaults to true
Specifies the location in which to query for versions.
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
Return
A collection of values returned by getKubernetesServiceVersions.
Parameters
Builder for com.pulumi.azure.containerservice.kotlin.inputs.GetKubernetesServiceVersionsPlainArgs.