SonarQube Enterprise configuration-as-code

which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

9.9 LTS, SonarScanner for Maven, SonarScanner CLI

how is SonarQube deployed: zip, Docker, Helm

Docker → Kustomize (k8s) implementation from official Helm chart

what are you trying to achieve

Configure static objects such as Portfolio’s, Quality Gates & Profiles as-code. We are required to create and maintain these objects through the graphical user interface. We would like to store this in a repository as-code.

Same goes for creating and maintaining projects. We’ve build some scripts that are run within pipelines to create and maintain projects by API. We’re in the process of migrating towards different source control tooling. We are going to configure all repositories and permissions as-code, so if we could include SonarQube within this configuration it would be awesome.

what have you tried so far to achieve this

We have analyzed the usability of this open-source implementation: Terraform Registry
We think it is usable for our use case, but it would be much preferred if SonarQube offered this natively. Depending on unofficial open-source projects carries its own set of risks.

If anyone has experience with this terraform provider I’d love to hear your thoughts and experiences.

Will SonarQube adopt or build a similar solution in the near future? I look forward to hearing from you.

1 Like

Hi Edwin

Thanks for sharing this, it’s a really interesting suggestion. The Product Manager who deals with this area is currently on holiday, I’ll make sure he sees it when he returns. It would be interesting to learn more about what you are trying to achieve here and set up an interview if you are willing?

Thanks again


atn: @Chris