azuredevops_agent_pool

Manages Elastic pool within Azure DevOps.

Example Usage

resource "azuredevops_project" "example" {
  name               = "Example Project"
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
  description        = "Managed by Terraform"
}

resource "azuredevops_serviceendpoint_azurerm" "example" {
  project_id                             = azuredevops_project.example.id
  service_endpoint_name                  = "Example Azure Connection"
  description                            = "Managed by Terraform"
  service_endpoint_authentication_scheme = "ServicePrincipal"
  credentials {
    serviceprincipalid  = "00000000-0000-0000-0000-000000000000"
    serviceprincipalkey = "00000000-0000-0000-0000-000000000000"
  }
  azurerm_spn_tenantid      = "00000000-0000-0000-0000-000000000000"
  azurerm_subscription_id   = "00000000-0000-0000-0000-000000000000"
  azurerm_subscription_name = "Subscription Name"
}

resource "azuredevops_elastic_pool" "example" {
  name                   = "Example Elastic Pool"
  service_endpoint_id    = azuredevops_serviceendpoint_azurerm.example.id
  service_endpoint_scope = azuredevops_project.example.id
  desired_idle           = 2
  max_capacity           = 3
  azure_resource_id      = "/subscriptions/<Subscription Id>/resourceGroups/<Resource Name>/providers/Microsoft.Compute/virtualMachineScaleSets/<VMSS Name>"
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to all arguments above, the following attributes are exported:

Import

Azure DevOps Agent Pools can be imported using the Elastic pool ID, e.g.

terraform import azuredevops_elastic_pool.example 0