integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
886 stars 726 forks source link

[BUG]: `github_repository_collaborators` much slower than `github_team_repository`/`github_repository_collaborator` #2149

Open pascal-hofmann opened 7 months ago

pascal-hofmann commented 7 months ago

Expected Behavior

We recently switched from using github_team_repository and github_repository_collaborator to github_repository_collaborators, because we wanted to have authoritative management of collaborators. We also expected that this would bring us some performance improvements, because we could reduce the number of resources by a lot.

Actual Behavior

Even though we have 2329 resources less, the terraform run now takes much longer than before (total run time is up from 6 minutes to 15 minutes.)

We also run into rate limiting issues sporadically, which was not the case before.

Terraform Version

Terraform v1.5.7 on darwin_amd64

Running against GHES 3.9.9 with parallel_requests = true.

Affected Resource(s)

Terraform Configuration Files

The resources are part of a bigger terraform project (used to managed our whole github organization) and we create the resources based on content fetched via HTTP plus some yaml configs, so it's too big to paste here.

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct