- which versions are you using : Developer 10.7
- how is SonarQube deployed: zip
- what are you trying to achieve: I am trying to write IaC for role and permission creation.
- what have you tried so far to achieve this: I used the UI to get this done. But it not ideal to do it from ui . I need a terraform provide through which i can create groups, project permission templates etc. but i cant find a terraform provider for sonarqube. What do you recommend how shall i approach this??
Hi,
Welcome to the community!
Your best bet is scripting the API.
And the best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.
You may also find this guide helpful.
HTH,
Ann
Hi,
I find the requirement absolutely justified.
There are already some open-source projects out there, but at the enterprise level, I would prefer if SonarSource directly took responsibility for a SonarQube Terraform Provider.
The advantages are obvious.
The Terraform Provider already takes into account all the pitfalls one might encounter with script-based API calls, especially when performing complex actions.
Differentiations between Create, Change, Delete. Dry-runs (plan without apply).
Configuration-shift detection.
Sure, you can script all of this yourself, but the effort and susceptibility to errors are enormous.
Terraform Providers follow an established best-practice approach for configuring infrastructure and systems via APIs.
This would save customers (paying customers at the enterprise level!) a lot of work.
Are there already efforts underway to achieve this as of today? Or is SonarSource already involved in corresponding open-source initiatives?
Kind regards.
Hi Matthias,
Thanks for reaching out re: Terraform. I am the PM on the Integrations team & we are aware of the request to provide an official Terraform Integration. We’ll reconsider it as a candidate for our upcoming roadmap review.
Kind regards,
Shubham
Hi Shubham,
Hope you’re doing well.
Just wanted to ask is there any estimation on whether this Terraform provider might be released this year?
In the meantime, we also found a community-supported provider:
SonarQube Terraform provider (jdamata)
Would you recommend using this provider for now, or would you advise waiting for an official SonarQube supported solution?
Thanks,
Eman