Skip to content

Limit number of Dev Boxes per user#

Cost Optimization · Dev Box · Rule · 2024_03 · Important

Limit the number of Dev Boxes a single user can create for a project.

Description#

Microsoft Dev Box is a service that allows users to create and manage a developer workstation in the cloud (Dev Boxes). Dev Boxes are virtual machines with specifications and configuration designed for developers. Each Dev Box is billed based on usage to a capped amount per month.

Dev Box Projects are used to manage Dev Boxes. By default, a single user can create multiple Dev Boxes for a single Dev Box Project. This can lead to unexpected costs.

Organizations should consider how many Dev Boxes are required for a single user and set reasonable limits.

Recommendation#

Consider limiting the number of Dev Boxes a single user can create for any projects. Additional consider, configuring budgets and alerts to monitor cost exceptions.

Examples#

Configure with Azure template#

To deploy Dev Box Projects that pass this rule:

  • Set the properties.maxDevBoxesPerUser property to limit the number of Dev Box a single user can create. E.g. 2

For example:

Azure Template snippet
{
  "type": "Microsoft.DevCenter/projects",
  "apiVersion": "2023-04-01",
  "name": "[parameters('name')]",
  "location": "[parameters('location')]",
  "properties": {
    "devCenterId": "[resourceId('Microsoft.DevCenter/devcenters', parameters('name'))]",
    "maxDevBoxesPerUser": 2
  },
  "dependsOn": [
    "[resourceId('Microsoft.DevCenter/devcenters', parameters('name'))]"
  ]
}

Configure with Bicep#

To deploy Dev Box Projects that pass this rule:

  • Set the properties.maxDevBoxesPerUser property to limit the number of Dev Box a single user can create. E.g. 2

For example:

Azure Bicep snippet
resource project 'Microsoft.DevCenter/projects@2023-04-01' = {
  name: name
  location: location
  properties: {
    devCenterId: center.id
    maxDevBoxesPerUser: 2
  }
}

Notes#

The properties.maxDevBoxesPerUser property does not limit the number of Dev Boxes a user can create across multiple projects.

Comments