Search code examples
azure-batchazure-bicep

I am getting a vmSize error when trying to deploy a batch service pool using bicep


I have the following Bicep code:

resource pool 'Microsoft.Batch/batchAccounts/pools@2021-06-01' = {
  name: '${bs.name}/run-python'
  properties: {
    scaleSettings: {
      fixedScale: {
        nodeDeallocationOption: 'TaskCompletion'
        targetDedicatedNodes: 1
      }
    }
    deploymentConfiguration: {
      cloudServiceConfiguration: {
        osFamily: '6'
      }
    }
    vmSize: 'standard_A1_v2'
    startTask: {
      commandLine: 'cmd /c "pip install azure-storage-blob pandas"'
      userIdentity: {
        autoUser: {
          elevationLevel: 'NonAdmin'
          scope: 'Pool'
        }
      }
      waitForSuccess: true
    }
  }
  dependsOn: [
    bs
  ]
}

Where I try to create a pool for my batch service, but when I try to deploy it, I get the following error:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"PropertyName","message":"vmSize"}]}

So I think the problem is the vmSize, but there I cannot find concrete example on what the value should be.


Solution

  • CloudServiceConfiguration Pools are deprecated. Please retry using VirtualMachineConfiguration.