Skip to content

Data Source: azurermKubernetesClusterNodePool

Use this data source to access information about an existing Kubernetes Cluster Node Pool.

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 dataAzurermKubernetesClusterNodePoolExample =
  new azurerm.dataAzurermKubernetesClusterNodePool.DataAzurermKubernetesClusterNodePool(
    this,
    "example",
    {
      kubernetes_cluster_name: "existing-cluster",
      name: "existing",
      resource_group_name: "existing-resource-group",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermKubernetesClusterNodePoolExample.id,
});

Arguments Reference

The following arguments are supported:

  • kubernetesClusterName - (Required) The Name of the Kubernetes Cluster where this Node Pool is located.

  • name - (Required) The name of this Kubernetes Cluster Node Pool.

  • resourceGroupName - (Required) The name of the Resource Group where the Kubernetes Cluster exists.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Kubernetes Cluster Node Pool.

  • enableAutoScaling - Does this Node Pool have Auto-Scaling enabled?

  • enableNodePublicIp - Do nodes in this Node Pool have a Public IP Address?

  • evictionPolicy - The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to spot.

  • hostGroupId - The ID of a Dedicated Host Group that this Node Pool should be run on. Changing this forces a new resource to be created.

-> Note: This requires that the Preview Feature microsoftContainerService/dedicatedHostGroupPreview is enabled and the Resource Provider is re-registered, see the documentation for more information.

  • maxCount - The maximum number of Nodes allowed when auto-scaling is enabled.

  • maxPods - The maximum number of Pods allowed on each Node in this Node Pool.

  • minCount - The minimum number of Nodes allowed when auto-scaling is enabled.

  • mode - The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).

  • nodeCount - The current number of Nodes in the Node Pool.

  • nodeLabels - A map of Kubernetes Labels applied to each Node in this Node Pool.

  • nodePublicIpPrefixId - Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.

  • nodeTaints - A map of Kubernetes Taints applied to each Node in this Node Pool.

  • orchestratorVersion - The version of Kubernetes configured on each Node in this Node Pool.

  • osDiskSizeGb - The size of the OS Disk on each Node in this Node Pool.

  • osDiskType - The type of the OS Disk on each Node in this Node Pool.

  • osType - The operating system used on each Node in this Node Pool.

  • priority - The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.

  • proximityPlacementGroupId - The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.

  • spotMaxPrice - The maximum price being paid for Virtual Machines in this Scale Set. 1 means the current on-demand price for a Virtual Machine.

  • tags - A mapping of tags assigned to the Kubernetes Cluster Node Pool.

  • upgradeSettings - A upgradeSettings block as documented below.

  • vmSize - The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.

  • vnetSubnetId - The ID of the Subnet in which this Node Pool exists.

  • zones - A list of the Availability Zones where the Nodes in this Node Pool exist.


A upgradeSettings block exports the following:

  • maxSurge - The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Kubernetes Cluster Node Pool.