New sonarqube_rules data source, DevOps platform bindings on Community with the Community Branch Plugin, and a fix for activating rules without a severity. No breaking changes.
Features
- feat: add sonarqube_rules data source by @Cesarsk in #414 — lists every rule matching filters (
search,languages,repositories,severities,statuses,tags,types), following all pages ofapi/rules/search, so a set of rules can be activated on a quality profile withfor_each; fixes #84
data "sonarqube_rules" "critical_code_smells" {
languages = ["java"]
types = ["CODE_SMELL"]
severities = ["CRITICAL"]
statuses = ["READY"]
}
resource "sonarqube_qualityprofile_activate_rule" "critical_code_smells" {
for_each = { for rule in data.sonarqube_rules.critical_code_smells.rules : rule.key => rule }
key = sonarqube_qualityprofile.java.key
rule = each.key
severity = each.value.severity
}Fixes
- fix: let sonarqube_qualityprofile_activate_rule omit severity, in #414 —
severityis optional, but leaving it unset failed withValue of parameter 'severity' () must be one of. The rule now gets its default severity - fix: allow DevOps platform bindings on Community with a plugin by @Cesarsk in #415 — the four
*_bindingresources refused to run on Community before calling SonarQube, which blocked users of the Community Branch Plugin. They now let SonarQube decide; on plain Community the error says bindings need the Developer edition or a plugin; fixes #252
Docs
- docs: say that renaming a sonarqube_project replaces it by @Cesarsk in #416 — SonarQube has no API to rename a project, so changing
namecreates a new project. The docs now give theignore_changesworkaround; changing the key is done in place
Full Changelog: v0.16.27...v0.16.28