jdamata / terraform-provider-sonarqube

Terraform provider for managing Sonarqube configuration
GNU General Public License v3.0
62 stars 56 forks source link

Support paginated response #237

Open apj0nes opened 8 months ago

apj0nes commented 8 months ago

Terraform Version

Terraform v1.5.6 jdamata/sonarqube v0.16.10

Affected Resource(s)

Terraform Configuration Files

N/A

Expected Behavior

All Sonarqube Quality Profile Project Associations read.

Actual Behavior

The /api/qualityprofiles/projects returns a paginated list with 100 results per page by default. When there are more than 100 projects with a quality profile, the read operation will fail if a project is not returned i.e. it is not returned in the first 100 results.

Quick, short-term fix

Increase page size to 500 (happy to PR this)

Long term fix

Paginate the response. I have also linked a similar issue below. I believe this is an issue in multiple places and requires a wider effort.

Steps to Reproduce

Using a sonarqube_qualityprofile_project_association resource, reference a quality profile association not returned in the first 100 results

References

jdamata commented 8 months ago

im ok with increasing the page size as a temporary solution, if you want to pr that