Skip to content

Data Source: azurermKubernetesServiceVersions

Use this data source to retrieve the version of Kubernetes supported by Azure Kubernetes Service.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermKubernetesServiceVersionsCurrent =
  new azurerm.dataAzurermKubernetesServiceVersions.DataAzurermKubernetesServiceVersions(
    this,
    "current",
    {
      location: "West Europe",
    }
  );
new cdktf.TerraformOutput(this, "latest_version", {
  value: dataAzurermKubernetesServiceVersionsCurrent.latestVersion,
});
new cdktf.TerraformOutput(this, "versions", {
  value: dataAzurermKubernetesServiceVersionsCurrent.versions,
});

Argument Reference

  • location - Specifies the location in which to query for versions.

  • versionPrefix - (Optional) A prefix filter for the versions of Kubernetes which should be returned; for example 1 will return 19 to 114, whereas 112 will return 1122.

  • includePreview - (Optional) Should Preview versions of Kubernetes in AKS be included? Defaults to true

Attributes Reference

  • versions - The list of all supported versions.

  • latestVersion - The most recent version available. If includePreview ==False, this is the most recent non-preview version available.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the versions.