I'm using self-hosted agent in Azure Pipelines and I installed Terraform 0.13 there. When I use Terraform tasks in Azure Devops, as commandOptions I chose '-plugin-dir=/usr/local/bin/.terraform.d/plugins' to skip plugin downloading. Unfortunately, Terraform downloads it to artifact and makes it much heavier than it should be. Also next stage (deployment stage) uses only plugins from artifact, not from our agent. We do not have much space on our virtual machine that's why we want to avoid unnecessary downloads. In addition, we defined .terraformrc in home directory with plugin directory. Also we added environment variable as written there: https://www.terraform.io/docs/commands/cli-config.html#provider-installation
Thank you in advance!