Is it possible to log in through the system PAT? which is used in AzureDevops Pipelines? $(System.AccessToken)
Hi @y6vmeq You can use the $(System.AccessToken), make sure you export the PAT as the ENV variable
Example:
- bash: |
displayName: 'Terraform'
env:
AZDO_PERSONAL_ACCESS_TOKEN: $(System.AccessToken)
Thanks. I use this extension (https://marketplace.visualstudio.com/items?itemName=charleszipp.azure-pipelines-tasks-terraform)
And there is no way to use environment variables. Solved the problem like this
- task: TerraformCLI@0
displayName: Terraform plan
inputs:
command: plan
workingDirectory: $(terraform_path)
environmentServiceName: Main_${{ parameters.Subscription }}
commandOptions: -out=terraform.tfplan -var-file="../../vars/Infrastructure.tfvars.json" -var azuredevops_project_id="$(System.TeamProjectId)" -var azuredevops_org_service_url="$(System.TeamFoundationCollectionUri)" -var azuredevops_personal_access_token="$(System.AccessToken)"
Most helpful comment
Thanks. I use this extension (https://marketplace.visualstudio.com/items?itemName=charleszipp.azure-pipelines-tasks-terraform)
And there is no way to use environment variables. Solved the problem like this