@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 25.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* Agent Pool.
*
* Uses Azure REST API version 2024-10-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01.
*
* Other available API versions: 2019-11-01, 2020-01-01, 2020-02-01, 2020-03-01, 2020-04-01, 2020-06-01, 2020-07-01, 2020-09-01, 2020-11-01, 2020-12-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-07-01, 2021-08-01, 2021-09-01, 2021-10-01, 2021-11-01-preview, 2022-01-01, 2022-01-02-preview, 2022-02-01, 2022-02-02-preview, 2022-03-01, 2022-03-02-preview, 2022-04-01, 2022-04-02-preview, 2022-05-02-preview, 2022-06-01, 2022-06-02-preview, 2022-07-01, 2022-07-02-preview, 2022-08-02-preview, 2022-08-03-preview, 2022-09-01, 2022-09-02-preview, 2022-10-02-preview, 2022-11-01, 2022-11-02-preview, 2023-01-01, 2023-01-02-preview, 2023-02-01, 2023-02-02-preview, 2023-03-01, 2023-03-02-preview, 2023-04-01, 2023-04-02-preview, 2023-05-01, 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview, 2023-10-01, 2023-10-02-preview, 2023-11-01, 2023-11-02-preview, 2024-01-01, 2024-01-02-preview, 2024-02-01, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-01, 2024-05-02-preview, 2024-06-02-preview, 2024-07-01, 2024-07-02-preview, 2024-08-01, 2024-09-01, 2024-09-02-preview, 2024-10-02-preview, 2025-01-01, 2025-01-02-preview, 2025-02-01, 2025-02-02-preview, 2025-03-01, 2025-03-02-preview, 2025-04-01, 2025-04-02-preview, 2025-05-01, 2025-05-02-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native containerservice [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class AgentPool extends pulumi.CustomResource {
/**
* Get an existing AgentPool resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): AgentPool;
/**
* Returns true if the given object is an instance of AgentPool. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AgentPool;
/**
* The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
*/
readonly availabilityZones: pulumi.Output<string[] | undefined>;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* AKS will associate the specified agent pool with the Capacity Reservation Group.
*/
readonly capacityReservationGroupID: pulumi.Output<string | undefined>;
/**
* Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
*/
readonly count: pulumi.Output<number | undefined>;
/**
* CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
*/
readonly creationData: pulumi.Output<outputs.containerservice.CreationDataResponse | undefined>;
/**
* If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> version being used.
*/
readonly currentOrchestratorVersion: pulumi.Output<string>;
/**
* Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
*/
readonly eTag: pulumi.Output<string>;
/**
* Whether to enable auto-scaler
*/
readonly enableAutoScaling: pulumi.Output<boolean | undefined>;
/**
* This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption
*/
readonly enableEncryptionAtHost: pulumi.Output<boolean | undefined>;
/**
* See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.
*/
readonly enableFIPS: pulumi.Output<boolean | undefined>;
/**
* Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.
*/
readonly enableNodePublicIP: pulumi.Output<boolean | undefined>;
/**
* Whether to enable UltraSSD
*/
readonly enableUltraSSD: pulumi.Output<boolean | undefined>;
/**
* GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
*/
readonly gpuInstanceProfile: pulumi.Output<string | undefined>;
/**
* This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
*/
readonly hostGroupID: pulumi.Output<string | undefined>;
/**
* The Kubelet configuration on the agent pool nodes.
*/
readonly kubeletConfig: pulumi.Output<outputs.containerservice.KubeletConfigResponse | undefined>;
/**
* Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
*/
readonly kubeletDiskType: pulumi.Output<string | undefined>;
/**
* The OS configuration of Linux agent nodes.
*/
readonly linuxOSConfig: pulumi.Output<outputs.containerservice.LinuxOSConfigResponse | undefined>;
/**
* The maximum number of nodes for auto-scaling
*/
readonly maxCount: pulumi.Output<number | undefined>;
/**
* The maximum number of pods that can run on a node.
*/
readonly maxPods: pulumi.Output<number | undefined>;
/**
* A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
*/
readonly messageOfTheDay: pulumi.Output<string | undefined>;
/**
* The minimum number of nodes for auto-scaling
*/
readonly minCount: pulumi.Output<number | undefined>;
/**
* A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
*/
readonly mode: pulumi.Output<string | undefined>;
/**
* The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
readonly name: pulumi.Output<string>;
/**
* Network-related settings of an agent pool.
*/
readonly networkProfile: pulumi.Output<outputs.containerservice.AgentPoolNetworkProfileResponse | undefined>;
/**
* The version of node image
*/
readonly nodeImageVersion: pulumi.Output<string>;
/**
* The node labels to be persisted across all nodes in agent pool.
*/
readonly nodeLabels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
*/
readonly nodePublicIPPrefixID: pulumi.Output<string | undefined>;
/**
* The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
*/
readonly nodeTaints: pulumi.Output<string[] | undefined>;
/**
* Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
*/
readonly orchestratorVersion: pulumi.Output<string | undefined>;
/**
* OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
*/
readonly osDiskSizeGB: pulumi.Output<number | undefined>;
/**
* The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
*/
readonly osDiskType: pulumi.Output<string | undefined>;
/**
* Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
*/
readonly osSKU: pulumi.Output<string | undefined>;
/**
* The operating system type. The default is Linux.
*/
readonly osType: pulumi.Output<string | undefined>;
/**
* If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
*/
readonly podSubnetID: pulumi.Output<string | undefined>;
/**
* When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded
*/
readonly powerState: pulumi.Output<outputs.containerservice.PowerStateResponse | undefined>;
/**
* The current deployment or provisioning state.
*/
readonly provisioningState: pulumi.Output<string>;
/**
* The ID for Proximity Placement Group.
*/
readonly proximityPlacementGroupID: pulumi.Output<string | undefined>;
/**
* This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
*/
readonly scaleDownMode: pulumi.Output<string | undefined>;
/**
* This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
*/
readonly scaleSetEvictionPolicy: pulumi.Output<string | undefined>;
/**
* The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
*/
readonly scaleSetPriority: pulumi.Output<string | undefined>;
/**
* The security settings of an agent pool.
*/
readonly securityProfile: pulumi.Output<outputs.containerservice.AgentPoolSecurityProfileResponse | undefined>;
/**
* Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
*/
readonly spotMaxPrice: pulumi.Output<number | undefined>;
/**
* The tags to be persisted on the agent pool virtual machine scale set.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Resource type
*/
readonly type: pulumi.Output<string>;
/**
* Settings for upgrading the agentpool
*/
readonly upgradeSettings: pulumi.Output<outputs.containerservice.AgentPoolUpgradeSettingsResponse | undefined>;
/**
* VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. If this field is not specified, AKS will attempt to find an appropriate VM SKU for your pool, based on quota and capacity. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions
*/
readonly vmSize: pulumi.Output<string | undefined>;
/**
* If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
*/
readonly vnetSubnetID: pulumi.Output<string | undefined>;
/**
* The Windows agent pool's specific profile.
*/
readonly windowsProfile: pulumi.Output<outputs.containerservice.AgentPoolWindowsProfileResponse | undefined>;
/**
* Determines the type of workload a node can run.
*/
readonly workloadRuntime: pulumi.Output<string | undefined>;
/**
* Create a AgentPool resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AgentPoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a AgentPool resource.
*/
export interface AgentPoolArgs {
/**
* The name of the agent pool.
*/
agentPoolName?: pulumi.Input<string>;
/**
* The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
*/
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;
/**
* AKS will associate the specified agent pool with the Capacity Reservation Group.
*/
capacityReservationGroupID?: pulumi.Input<string>;
/**
* Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
*/
count?: pulumi.Input<number>;
/**
* CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
*/
creationData?: pulumi.Input<inputs.containerservice.CreationDataArgs>;
/**
* Whether to enable auto-scaler
*/
enableAutoScaling?: pulumi.Input<boolean>;
/**
* This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption
*/
enableEncryptionAtHost?: pulumi.Input<boolean>;
/**
* See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.
*/
enableFIPS?: pulumi.Input<boolean>;
/**
* Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.
*/
enableNodePublicIP?: pulumi.Input<boolean>;
/**
* Whether to enable UltraSSD
*/
enableUltraSSD?: pulumi.Input<boolean>;
/**
* GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
*/
gpuInstanceProfile?: pulumi.Input<string | enums.containerservice.GPUInstanceProfile>;
/**
* This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
*/
hostGroupID?: pulumi.Input<string>;
/**
* The Kubelet configuration on the agent pool nodes.
*/
kubeletConfig?: pulumi.Input<inputs.containerservice.KubeletConfigArgs>;
/**
* Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
*/
kubeletDiskType?: pulumi.Input<string | enums.containerservice.KubeletDiskType>;
/**
* The OS configuration of Linux agent nodes.
*/
linuxOSConfig?: pulumi.Input<inputs.containerservice.LinuxOSConfigArgs>;
/**
* The maximum number of nodes for auto-scaling
*/
maxCount?: pulumi.Input<number>;
/**
* The maximum number of pods that can run on a node.
*/
maxPods?: pulumi.Input<number>;
/**
* A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
*/
messageOfTheDay?: pulumi.Input<string>;
/**
* The minimum number of nodes for auto-scaling
*/
minCount?: pulumi.Input<number>;
/**
* A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
*/
mode?: pulumi.Input<string | enums.containerservice.AgentPoolMode>;
/**
* Network-related settings of an agent pool.
*/
networkProfile?: pulumi.Input<inputs.containerservice.AgentPoolNetworkProfileArgs>;
/**
* The node labels to be persisted across all nodes in agent pool.
*/
nodeLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
*/
nodePublicIPPrefixID?: pulumi.Input<string>;
/**
* The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
*/
nodeTaints?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
*/
orchestratorVersion?: pulumi.Input<string>;
/**
* OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
*/
osDiskSizeGB?: pulumi.Input<number>;
/**
* The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
*/
osDiskType?: pulumi.Input<string | enums.containerservice.OSDiskType>;
/**
* Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
*/
osSKU?: pulumi.Input<string | enums.containerservice.OSSKU>;
/**
* The operating system type. The default is Linux.
*/
osType?: pulumi.Input<string | enums.containerservice.OSType>;
/**
* If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
*/
podSubnetID?: pulumi.Input<string>;
/**
* When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded
*/
powerState?: pulumi.Input<inputs.containerservice.PowerStateArgs>;
/**
* The ID for Proximity Placement Group.
*/
proximityPlacementGroupID?: pulumi.Input<string>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
/**
* The name of the managed cluster resource.
*/
resourceName: pulumi.Input<string>;
/**
* This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
*/
scaleDownMode?: pulumi.Input<string | enums.containerservice.ScaleDownMode>;
/**
* This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
*/
scaleSetEvictionPolicy?: pulumi.Input<string | enums.containerservice.ScaleSetEvictionPolicy>;
/**
* The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
*/
scaleSetPriority?: pulumi.Input<string | enums.containerservice.ScaleSetPriority>;
/**
* The security settings of an agent pool.
*/
securityProfile?: pulumi.Input<inputs.containerservice.AgentPoolSecurityProfileArgs>;
/**
* Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
*/
spotMaxPrice?: pulumi.Input<number>;
/**
* The tags to be persisted on the agent pool virtual machine scale set.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The type of Agent Pool.
*/
type?: pulumi.Input<string | enums.containerservice.AgentPoolType>;
/**
* Settings for upgrading the agentpool
*/
upgradeSettings?: pulumi.Input<inputs.containerservice.AgentPoolUpgradeSettingsArgs>;
/**
* VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. If this field is not specified, AKS will attempt to find an appropriate VM SKU for your pool, based on quota and capacity. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions
*/
vmSize?: pulumi.Input<string>;
/**
* If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
*/
vnetSubnetID?: pulumi.Input<string>;
/**
* The Windows agent pool's specific profile.
*/
windowsProfile?: pulumi.Input<inputs.containerservice.AgentPoolWindowsProfileArgs>;
/**
* Determines the type of workload a node can run.
*/
workloadRuntime?: pulumi.Input<string | enums.containerservice.WorkloadRuntime>;
}