We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.containerservice.getKubernetesServiceVersions
Explore with Pulumi AI
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)
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
})
}
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 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()));
}
}
variables:
current:
fn::invoke:
Function: azure:containerservice:getKubernetesServiceVersions
Arguments:
location: West Europe
outputs:
versions: ${current.versions}
latestVersion: ${current.latestVersion}
Using getKubernetesServiceVersions
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 getKubernetesServiceVersions(args: GetKubernetesServiceVersionsArgs, opts?: InvokeOptions): Promise<GetKubernetesServiceVersionsResult>
function getKubernetesServiceVersionsOutput(args: GetKubernetesServiceVersionsOutputArgs, opts?: InvokeOptions): Output<GetKubernetesServiceVersionsResult>
def get_kubernetes_service_versions(include_preview: Optional[bool] = None,
location: Optional[str] = None,
version_prefix: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKubernetesServiceVersionsResult
def get_kubernetes_service_versions_output(include_preview: Optional[pulumi.Input[bool]] = None,
location: Optional[pulumi.Input[str]] = None,
version_prefix: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesServiceVersionsResult]
func GetKubernetesServiceVersions(ctx *Context, args *GetKubernetesServiceVersionsArgs, opts ...InvokeOption) (*GetKubernetesServiceVersionsResult, error)
func GetKubernetesServiceVersionsOutput(ctx *Context, args *GetKubernetesServiceVersionsOutputArgs, opts ...InvokeOption) GetKubernetesServiceVersionsResultOutput
> Note: This function is named GetKubernetesServiceVersions
in the Go SDK.
public static class GetKubernetesServiceVersions
{
public static Task<GetKubernetesServiceVersionsResult> InvokeAsync(GetKubernetesServiceVersionsArgs args, InvokeOptions? opts = null)
public static Output<GetKubernetesServiceVersionsResult> Invoke(GetKubernetesServiceVersionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKubernetesServiceVersionsResult> getKubernetesServiceVersions(GetKubernetesServiceVersionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:containerservice/getKubernetesServiceVersions:getKubernetesServiceVersions
arguments:
# arguments dictionary
The following arguments are supported:
- Location string
- Specifies the location in which to query for versions.
- Include
Preview bool - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- Version
Prefix string - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
- Location string
- Specifies the location in which to query for versions.
- Include
Preview bool - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- Version
Prefix string - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
- location String
- Specifies the location in which to query for versions.
- include
Preview Boolean - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- version
Prefix String - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
- location string
- Specifies the location in which to query for versions.
- include
Preview boolean - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- version
Prefix string - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
- location str
- Specifies the location in which to query for versions.
- include_
preview bool - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- version_
prefix str - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
- location String
- Specifies the location in which to query for versions.
- include
Preview Boolean - Should Preview versions of Kubernetes in AKS be included? Defaults to
true
- version
Prefix String - A prefix filter for the versions of Kubernetes which should be returned; for example
1.
will return1.9
to1.14
, whereas1.12
will return1.12.2
.
getKubernetesServiceVersions Result
The following output properties are available:
- Default
Version string - The N-1 minor non-preview version and latest patch.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version string - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - Location string
- Versions List<string>
- The list of all supported versions.
- Include
Preview bool - Version
Prefix string
- Default
Version string - The N-1 minor non-preview version and latest patch.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version string - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - Location string
- Versions []string
- The list of all supported versions.
- Include
Preview bool - Version
Prefix string
- default
Version String - The N-1 minor non-preview version and latest patch.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Version String - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - location String
- versions List<String>
- The list of all supported versions.
- include
Preview Boolean - version
Prefix String
- default
Version string - The N-1 minor non-preview version and latest patch.
- id string
- The provider-assigned unique ID for this managed resource.
- latest
Version string - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - location string
- versions string[]
- The list of all supported versions.
- include
Preview boolean - version
Prefix string
- default_
version str - The N-1 minor non-preview version and latest patch.
- id str
- The provider-assigned unique ID for this managed resource.
- latest_
version str - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - location str
- versions Sequence[str]
- The list of all supported versions.
- include_
preview bool - version_
prefix str
- default
Version String - The N-1 minor non-preview version and latest patch.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Version String - The most recent version available. If
include_preview == false
, this is the most recent non-preview version available. - location String
- versions List<String>
- The list of all supported versions.
- include
Preview Boolean - version
Prefix String
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.