Open EirikNess opened 10 months ago
I'm having the same issue. Trying to give the project build service account enhanced permissions in repos for pull requests tasks.
Can't select the specific Build Service User, but can use the Security Service Group, the build service is a member of (in the collection). The permissions update fine, but the script ultimately fails with the same error as OP shows.
Is there a fix for this?
Just ran into the exact same error. I have not found a workaround for this either.
Update: Since the resources are correctly created, we decided that we're pretty much unblocked for now, and for now we are working around it by setting count = 0
on the azuredevops_git_permissions
resources. This allows other teams to not hit this same error on TF apply. Would be nice if it is fixed, however, as I can imagine doing further changes may be a pain...
Community Note
Terraform (and Azure DevOps Provider) Version
Terraform v4.6.6 on linux_arm64 Provider version: 0.11.1
Affected Resource(s)
azuredevops_git_permission
Terraform Configuration Files
First time reporting a bug, but here goes :) Setting git_permission on project-level groups works fine, but when setting permission on collection-level groups, terraform Apply fails. The permission gets updated in DevOps, but terraform fails to read the rules after write.
Debug Output
Expected Behavior
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Actual Behavior
Setting git_permission on project groups works fine, but when setting permission on collection-level groups, terraform Apply fails. The permission gets updated in DevOps, but terraform fails to read the rules after write. Re-running terraform Apply will reproduce the error. I have tested to use time_sleep resource to force a wait between write and read, but with no luck.
Steps to Reproduce
terraform apply
Important Factoids
References
0000