Skip to content

Data source: azurermBatchPool

Use this data source to access information about an existing Batch pool

Example Usage

/*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.*/
new azurerm.dataAzurermBatchPool.DataAzurermBatchPool(this, "example", {
  account_name: "testbatchaccount",
  name: "testbatchpool",
  resource_group_name: "test",
});

Attributes Reference

The following attributes are exported:

  • id - The Batch pool ID.

  • name - The name of the Batch pool.

  • accountName - The name of the Batch account.

  • nodeAgentSkuId - The SKU of the node agents in the Batch pool.

  • vmSize - The size of the VM created in the Batch pool.

  • fixedScale - A fixedScale block that describes the scale settings when using fixed scale.

  • autoScale - A autoScale block that describes the scale settings when using auto scale.

  • dataDisks - A dataDisks block describes the data disk settings.

  • diskEncryption - A diskEncryption block describes the disk encryption configuration applied on compute nodes in the pool.

  • extensions - An extensions block describes the extension settings

  • interNodeCommunication - Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool.

  • licenseType - The type of on-premises license to be used when deploying the operating system.

  • nodePlacement - A nodePlacement block that describes the placement policy for allocating nodes in the pool.

  • osDiskPlacement - Specifies the ephemeral disk placement for operating system disk for all VMs in the pool.

  • storageImageReference - The reference of the storage image used by the nodes in the Batch pool.

  • startTask - A startTask block that describes the start task settings for the Batch pool.

  • taskSchedulingPolicy - A taskSchedulingPolicy block that describes how tasks are distributed across compute nodes in a pool.

  • userAccounts - A userAccounts block that describes the list of user accounts to be created on each node in the pool.

  • windows - A windows block that describes the Windows configuration in the pool.

  • maxTasksPerNode - The maximum number of tasks that can run concurrently on a single compute node in the pool.

  • mount - A mount block that describes mount configuration.

  • certificate - One or more certificate blocks that describe the certificates installed on each compute node in the pool.

  • containerConfiguration - The container configuration used in the pool's VMs.


A fixedScale block exports the following:

  • targetDedicatedNodes - The number of nodes in the Batch pool.

  • targetLowPriorityNodes - The number of low priority nodes in the Batch pool.

  • resizeTimeout - The timeout for resize operations.


A autoScale block exports the following:

  • evaluationInterval - The interval to wait before evaluating if the pool needs to be scaled.

  • formula - The autoscale formula that needs to be used for scaling the Batch pool.


A dataDisks block exports the following:

  • lun - The lun is used to uniquely identify each data disk.

  • caching - The caching mode of data disks.

  • diskSizeGb - The initial disk size in GB when creating new data disk.

  • storageAccountType - The storage account type to be used for the data disk.


A diskEncryption block exports the following:

  • diskEncryptionTarget - On Linux pool, only temporaryDisk is supported; on Windows pool, osDisk and temporaryDisk must be specified.

An extensions block exports the following:

  • name - The name of the virtual machine extension.

  • publisher - The name of the extension handler publisher.The name of the extension handler publisher.

  • type - The type of the extensions.

  • typeHandlerVersion - The version of script handler.

  • autoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.

  • settingsJson - JSON formatted public settings for the extension.

  • protectedSettings - The extension can contain either protectedSettings or provisionAfterExtensions or no protected settings at all.

  • provisionAfterExtensions - The collection of extension names. Collection of extension names after which this extension needs to be provisioned.


A nodePlacement block exports the following:

  • policy - The placement policy for allocating nodes in the pool.

A startTask block exports the following:

  • commandLine - The command line executed by the start task.

  • container - The settings for the container under which the start task runs.

  • taskRetryMaximum - The number of retry count

  • waitForSuccess - A flag that indicates if the Batch pool should wait for the start task to be completed.

  • commonEnvironmentProperties - A map of strings (key,value) that represents the environment variables to set in the start task.

  • userIdentity - A userIdentity block that describes the user identity under which the start task runs.

  • resourceFile - One or more resourceFile blocks that describe the files to be downloaded to a compute node.


A container block exports the following:

  • imageName - The image to use to create the container in which the task will run.

  • runOptions - Additional options to the container create command.

  • registry - The same reference as containerRegistries block defined as follows.

  • workingDirectory - A flag to indicate where the container task working directory is.


A userIdentity block exports the following:

  • userName - The username to be used by the Batch pool start task.

  • autoUser - A autoUser block that describes the user identity under which the start task runs.


A autoUser block exports the following:

  • elevationLevel - The elevation level of the user identity under which the start task runs.

  • scope - The scope of the user identity under which the start task runs.


A certificate block exports the following:

  • id - The fully qualified ID of the certificate installed on the pool.

  • storeLocation - The location of the certificate store on the compute node into which the certificate is installed, either currentUser or localMachine.

-> NOTE: This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable azBatchCertificatesDir is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{userName}/certs) and certificates are placed in that directory.

  • storeName - The name of the certificate store on the compute node into which the certificate is installed.

-> NOTE: This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference).

  • visibility - Which user accounts on the compute node have access to the private data of the certificate.

A resourceFile block exports the following:

  • autoStorageContainerName - The storage container name in the auto storage account.

  • blobPrefix - The blob prefix used when downloading blobs from an Azure Storage container.

  • fileMode - The file permission mode attribute represented as a string in octal format (e.g. "0644").

  • filePath - The location on the compute node to which to download the file, relative to the task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified.

  • httpUrl - The URL of the file to download. If the URL is Azure Blob Storage, it must be readable using anonymous access.

  • storageContainerUrl - The URL of the blob container within Azure Blob Storage.

  • userAssignedIdentityId - An identity reference from pool's user assigned managed identity list.


A containerConfiguration block exports the following:

  • type - The type of container configuration.

  • containerImageNames - A list of container image names to use, as would be specified by dockerPull.

  • containerRegistries - Additional container registries from which container images can be pulled by the pool's VMs.


A containerRegistries block exports the following:

  • registryServer - The container registry URL. The default is "docker.io".

  • userName - The user name to log into the registry server.

  • password - The password to log into the registry server.

  • userAssignedIdentityId - The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password.


An mount exports the following:

Any property below is mutually exclusive with all other properties.

  • azureBlobFileSystem - A azureBlobFileSystem block defined as below.

  • azureFileShare - A azureFileShare block defined as below.

  • cifsMount - A cifsMount block defined as below.

  • nfsMount - A nfsMount block defined as below.


An azureBlobFileSystem block exports the following:

  • accountName - The Azure Storage Account name.

  • containerName - The Azure Blob Storage Container name.

  • relativeMountPath - The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the azBatchNodeMountsDir environment variable.

  • accountKey - The Azure Storage Account key. This property is mutually exclusive with both sasKey and identityId; exactly one must be specified.

  • sasKey - The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identityId; exactly one must be specified.

  • identityId - The ARM resource id of the user assigned identity. This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified.

  • blobfuseOptions - Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.


An azureFileShare block exports the following:

  • accountName - The Azure Storage Account name.

  • accountKey - The Azure Storage Account key.

  • azureFileUrl - The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'.

  • relativeMountPath - The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the azBatchNodeMountsDir environment variable.

  • mountOptions - Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.


A cifsMount block exports the following:

  • userName - The user to use for authentication against the CIFS file system.

  • password - The password to use for authentication against the CIFS file system.

  • source - The URI of the file system to mount.

  • relativeMountPath - The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the azBatchNodeMountsDir environment variable.

  • mountOptions - Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.


A nfsMount block exports the following:

  • source - The URI of the file system to mount.

  • relativeMountPath - The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the azBatchNodeMountsDir environment variable.

  • mountOptions - Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.


A networkConfiguration block exports the following:

  • subnetId - The ARM resource identifier of the virtual network subnet which the compute nodes of the pool are joined too.

  • dynamicVnetAssignmentScope - The scope of dynamic vnet assignment.

  • endpointConfiguration - The inbound NAT pools that are used to address specific ports on the individual compute node externally.

  • publicIps - A list of public IP ids that will be allocated to nodes.

  • publicAddressProvisioningType - Type of public IP address provisioning.


A endpointConfiguration block exports the following:

  • name - The name of the endpoint.

  • backendPort - The port number on the compute node.

  • protocol - The protocol of the endpoint.

  • frontendPortRange - The range of external ports that are used to provide inbound access to the backendPort on the individual compute nodes in the format of 10001100.

  • networkSecurityGroupRules - The list of network security group rules that are applied to the endpoint.


A networkSecurityGroupRules block exports the following:

  • access - The action that should be taken for a specified IP address, subnet range or tag.

  • priority - The priority for this rule.

  • sourceAddressPrefix - The source address prefix or tag to match for the rule.

  • sourcePortRanges - The source port ranges to match for the rule.


A taskSchedulingPolicy block exports the following:

  • nodeFillType - Supported values are pack and spread. pack means as many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. spread means that tasks should be assigned evenly across all nodes in the pool.

A userAccounts block exports the following:

  • name - The name of the user account.

  • password - The password for the user account.

  • elevationLevel - The elevation level of the user account. "NonAdmin" - The auto user is a standard user without elevated access. "Admin" - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin.

  • linuxUserConfiguration - The linuxUserConfiguration block defined below is a linux-specific user configuration for the user account. This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.

  • windowsUserConfiguration - The windowsUserConfiguration block defined below is a windows-specific user configuration for the user account. This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options.


A linuxUserConfiguration block exports the following:

  • uid - The group ID for the user account.

  • gid - The user ID of the user account.

  • sshPrivateKey - The SSH private key for the user account.


A windowsUserConfiguration block exports the following:

  • loginMode - Specifies login mode for the user.

A windows block exports the following:

Windows operating system settings on the virtual machine. This property must not be specified if the imageReference specifies a Linux OS image.

  • enableAutomaticUpdates - Whether automatic updates are enabled on the virtual machine.

Timeouts

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

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