Open poligraph opened 4 years ago
@poligraph The pre-config still needed here if you set org_url
and persona_access_token
in the TF script.
terraform {
required_version = ">= 0.13"
required_providers {
azuredevops = {
source = "microsoft/azuredevops"
version = ">=0.1.0"
}
}
}
provider "azuredevops" {
org_service_url = "https://dev.azure.com/MY-ORG/"
personal_access_token = ""
}
@xuachen I use token env variable AZDO_PERSONAL_ACCESS_TOKEN
as before with 0.0.1 provider and org_service_url
in config. But with 0.1.0 this combination does not work - I need to provide AZDO_ORG_SERVICE_URL
in ENV, what is not convenient to use.
@poligraph Your configuration should work for v0.1.0. For ADO provider, ENV configure AZDO_ORG_SERVICE_URL
and provider config org_service_url
are the same configuration. Can you check whether the personal access token point to the organization you use?
I test different configuration combination, all worked for me.
@xuzhang3 so here is my config
provider "azuredevops" {
version = "~> 0.1.0"
org_service_url = "https://dev.azure.com/MY-ORG/"
# personal_access_token = ""```
```env | grep AZDO
AZDO_ORG_SERVICE_URL=https://dev.azure.com/MY-ORG/
AZDO_PERSONAL_ACCESS_TOKEN=MY_TOKEN
terraform plan
work with no issues
but after I do unset AZDO_ORG_SERVICE_URL
it works fine :), let me do some research, I will not able to reproduce - I will close issues.
Community Note
Terraform (and Azure DevOps Provider) Version
terraform -v Terraform v0.13.5
Affected Resource(s)
provider azuredevops
Terraform Configuration Files
per-project config like this
global config like this
Debug Output
Panic Output
Expected Behavior
plan should work
Actual Behavior
Steps to Reproduce
unset AZDO_ORG_SERVICE_URL
terraform plan
Important Factoids
if I set ENV variable - plan works good, but without it - it does not work. I worked with provider version 0.0.1
References
0000