You can set up a self-hosted agent in Azure Pipelines to run inside a Windows Server Core (for Windows hosts), or Ubuntu container (for Linux hosts) with Docker.
Container Jobs are a relatively new feature of Azure DevOps which executes pipelines within a container.
Agent forwarding is a mechanism whereby an SSH client allows an SSH server to use the local agent on the server, the user logs into, as if it was local there.
In Azure, you can create Self Hosted Linux Build agent using release pipeline (Terraform template) and override template parameter values using variables.
Some of the errors you receive while creating infrastructure in Azure using Terraform
Using ARM template you can create new WLinux VM in a new/existing vNet, storage account, nic, and public ip with the new compute stack then install the Visual Studio Team Services build agent and all dependencies.