Skip to content

data-platform-hq/terraform-azuredevops-vmss-pool

Repository files navigation

Azure Devops VMSS Elastic Pool Terraform module

Terraform module for creation Azure Devops VMSS Elastic Pool

Usage

data "azurerm_subnet" "example" {
  name                 = "example-name"
  virtual_network_name = "example-vnet-name"
  resource_group_name  = "example-rg"
}

module "ado_vmss_agent_pool" {
  source  = "data-platform-hq/vmss-pool/azuredevops"
  version = "~> 1.0"

  vm_scale_set_name                   = "example-vm-scale-set"
  location                            = "eastus"
  resource_group                      = "example-rg"
  subnet_id                           = data.azurerm_subnet.example.id
  ado_project_name                    = "datahq"
  ado_service_connection_azurerm_name = "example-ado-service-connection-name"
  ado_vmss_pool_name                  = "example-ado-vmss-pool-name"
}

Requirements

Name Version
terraform >= 1.0.0
azuredevops >= 0.10.0
azurerm >= 4.0.1
tls >= 4.0.5

Providers

Name Version
azuredevops >= 0.10.0
tls >= 4.0.5

Modules

Name Source Version
vmss data-platform-hq/vmss/azurerm 1.3.0

Resources

Name Type
azuredevops_agent_queue.this resource
azuredevops_elastic_pool.this resource
azuredevops_pipeline_authorization.this resource
tls_private_key.this resource
azuredevops_project.this data source
azuredevops_serviceendpoint_azurerm.this data source

Inputs

Name Description Type Default Required
ado_project_name Target Azure DevOps Project name where VMSS agent pool would be provisioned string n/a yes
ado_service_connection_azurerm_name Name of existing Azure DevOps Service Connection AzureRM that points to Azure Subscription with VMSS used in agent pool string n/a yes
ado_vmss_pool_configuration Object with configuration options for Azure DevOps VMSS agent pool
object({
desired_idle = optional(number, 0)
max_capacity = optional(number, 3)
time_to_live_minutes = optional(number, 30)
recycle_after_each_use = optional(bool, false)
})
{} no
ado_vmss_pool_name Given name to Azure DevOps VMSS agent pool string n/a yes
ado_vmss_public_ip_prefix_enabled Boolean flag that determines whether Public IP Prefix is assigned to VM Scale Sets bool false no
analytics_workspace_id Resource ID of Log Analytics Workspace string null no
create_ado_resources Boolean flag that determines whether ADO resources will be created bool true no
drc_datasource_name Datasource syslog name string "datasource-syslog" no
drc_enabled Enable data collection rule. var.analytics_workspace_id must be provided bool false no
drc_facility_names List of Facility names list(string)
[
"daemon",
"syslog",
"user"
]
no
drc_log_levels List of Log levels list(string)
[
"Debug"
]
no
identity_ids List of user assigned identity IDs list(string) null no
location The Azure Region in which all resources in this example should be created. string n/a yes
resource_group The name of the resource group. string n/a yes
scale_set_configuration Configuration options for linux virtual machine scale set
object({
sku = optional(string)
instances = optional(string)
admin_username = optional(string)
admin_password = optional(string)
disable_password_authentication = optional(bool)
priority = optional(string)
overprovision = optional(bool)
single_placement_group = optional(bool)
upgrade_mode = optional(string)
enable_ip_forwarding_interface = optional(bool)
domain_name_label = optional(string)
lb_backend_address_pool_ids = optional(list(string))
})
{
"instances": "0"
}
no
subnet_id Subnet where VM Scale Sets would be provisioned string n/a yes
vm_scale_set_name VM Scale Sets name string n/a yes

Outputs

Name Description
ado_elastic_pool_name Azure DevOps VMSS pool name
public_ip_prefix Public IP Address Prefix CIDR
tls_key SSH Key for VMSS authorization
vmss_id VM Scale Sets id

License

Apache 2 Licensed. For more information please see LICENSE