microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
372 stars 260 forks source link

Issue with data consistency between azuredevops_groups and azuredevops_group #1035

Open bgmonroe opened 2 months ago

bgmonroe commented 2 months ago

Community Note

Terraform (and Azure DevOps Provider) Version

$ terraform version
Terraform v1.8.1
on darwin_arm64
+ provider registry.terraform.io/microsoft/azuredevops v1.0.1

Affected Resource(s)

Important Factoids

Currently state:

Problem: Most (all, I think) of the azuredevops_*_permissions resource examples in the published documentation show the resource's principal argument accepting the output of the id attribute from the azuredevops_group data source. This causes confusion when using the azuredevops_groups data source, since that value is not the correct value for principal arg.

Request: Please set the id attribute for each returned group from the azuredevops_groups data source to the same value as its descriptor.

References

xuzhang3 commented 1 month ago

@bgmonroe the id and descriptor are the same, descriptor can change to id by API(https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/storage-keys/get?view=azure-devops-rest-7.1&tabs=HTTP). You can also use the origin_id as the id in azuredevops_groups