terraform-provider-azuredevops icon indicating copy to clipboard operation
terraform-provider-azuredevops copied to clipboard

Add support for managing pool vmss / elastic pools

Open Ravio1i opened this issue 3 years ago • 2 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I'd like to manage elastic pools in Azure DevOps. This means using terraform to apply and destroy pools linked to Azure VM Scale Sets.

New or Affected Resource(s)

  • azuredevops_agent_elasticpool

Potential Terraform Configuration

resource "azuredevops_agent_elasticpool" "pool" {
  name                = "sample-elasticpool"
  auto_provision  = false
  desired_idle      = 1
  max_capacity    = 3
  maxSavedNodeCount = 0
  serviceendpoint_azurem_id = azuredevops_serviceendpoint_azurerm.azure.id
  vmss_id             = "/subscriptions/..../..."
   ....
}

References

  • Scale set https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/scale-set-agents?view=azure-devops
  • API https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/elasticpools/create?view=azure-devops-rest-6.1

Ravio1i avatar May 05 '21 09:05 Ravio1i

Hi @Ravio1i,

Please vote on my #204 feature request, since this request seems to be about the same thing. 🙂 Also, there's some additional information inside of it that might be of interest for you.

aleqsss avatar May 07 '21 09:05 aleqsss

I accidentally filed a duplicate on this one. In it I proposed a change to the existing azuredevops_agent_pool instead of a new resource.

resource "azuredevops_agent_pool" "pool" {
  name                   = "scalesetpool"
  description            = "Scale set agent pool"
  pool_type              = "scaleset"
  scaleset_configuration = {
    service_connection_id      = azuredevops_serviceendpoint_azurerm.endpoint.id
    azure_scaleset_name        = "vmss"
    automatically_tear_down    = true
    max_agents                 = 10
    min_agents                 = 2
    delete_excess_agents_delay = 30
  }
}

I'm not precious about it and I also like the idea of a new resource. I'm just adding this into the mix so anyone implementing it has multiple ideas to pull from. I'm just keen to have the ability to control the VMSS agent pools with Terraform regardless of how it ends up.

davidaughey avatar Feb 18 '22 15:02 davidaughey

Please vote on this issue: https://developercommunity.visualstudio.com/t/Update-of-the-Go-SDK-to-include-new-feat/10186787

aristosvo avatar Nov 01 '22 10:11 aristosvo