Skip to content

DeimosCloud/terraform-azure-azagent

Repository files navigation

Terraform Azure AzAgent Module

Self Hosted Agent for running Pipelines on Azure## Requirements

Usage

module "self_hosted_agent" {
  source              = "../modules/linux_agent"
  prefix              = "MyProject"
  resource_group_name = azurerm_resource_group.resource_group.name
  registry_username   = var.registry_username
  registry_secret     = var.registry_password
  azp_url             = "https://dev.azure.com/${var.org_name}"
  azp_token           = var.admin_private_access_token
  azp_pool_name       = "My Pool"
  registry_url        = var.acr_registry_url
}

The User whose token is to be used must have Agent Pool Manage and Read Permissions (https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#confirm-the-user-has-permission)

Contributing

Report issues/questions/feature requests on in the issues section.

Full contributing guidelines are covered here.

Requirements

Name Version
terraform >= 0.13
azuredevops >= 0.1.0
azurerm >= 2.37.0

Providers

Name Version
azuredevops 0.1.8
azurerm 2.94.0
null 3.1.0
random 3.1.0

Modules

No modules.

Resources

Name Type
azuredevops_agent_pool.pool resource
azurerm_container_group.cg resource
null_resource.deploy_container resource
random_id.this resource
azurerm_resource_group.cg data source

Inputs

Name Description Type Default Required
azp_pool_name The URL of the Azure DevOps or Azure DevOps Server instance string "Default" no
azp_token Azure DevOps Token string n/a yes
azp_url The URL of the Azure DevOps or Azure DevOps Server instance string n/a yes
cpu The required number of CPU cores of the containers. Changing this forces a new resource to be created. string "0.5" no
create_image Whether to create the image and push to registry. If image already exists no need to push bool false no
image_name Name of docker image to create or pull from for the agent string "dockeragent" no
image_tag Image Tag string "latest" no
memory The required memory of the containers in GB. Changing this forces a new resource to be created. string "1.5" no
prefix The prefix for all created resources string "linux-agent" no
registry_secret Password for user to be used for container authentication string null no
registry_url URL of Registry to deploy Container to string null no
registry_username The username used to authenticate to registry. Could be service principal ID string null no
resource_group_name The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no

Outputs

Name Description
agent_container_group_id The ID of the container Group the Agent was deployed in
agent_pool_name Name of Pool agent was deployed to

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published