jdamata / terraform-provider-sonarqube

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

Add support for project specific settings #63

Closed n0rig closed 1 month ago

n0rig commented 2 years ago

Expected Behavior

I would like to be able to have terraform resources for configuring the project specific settings here: image

Actual Behavior

This ability is currently not available. We can only create projects and assign quality gates/profiles. Nothing more.

jdamata commented 2 years ago

I don't see any web_api we can leverage to expose this configuration. I've added the upstream-blocked label for now.

jshield commented 2 years ago

Project Configuration is achieved via calling the settings/set api but passing the project id as the component parameter along with the request.

curl 'http://localhost:9000/api/settings/set' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-raw 'key=sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay&component=SodaPOP_SodaPOP_AYPo1_2g6_6Zt0tToqLF&value=36' 

same with retrieving project specific config

api/settings/values?keys=sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay&component=SodaPOP_SodaPOP_AYPo1_2g6_6Zt0tToqLF
freeranger commented 8 months ago

@n0rig The provider supports project specific settings these days: https://registry.terraform.io/providers/jdamata/sonarqube/latest/docs/resources/sonarqube_project Is this still an issue for you or can it be closed?