github jdamata/terraform-provider-sonarqube v0.16.28

5 hours ago

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 of api/rules/search, so a set of rules can be activated on a quality profile with for_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 — severity is optional, but leaving it unset failed with Value 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 *_binding resources 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 name creates a new project. The docs now give the ignore_changes workaround; changing the key is done in place

Full Changelog: v0.16.27...v0.16.28

Don't miss a new terraform-provider-sonarqube release

NewReleases is sending notifications on new releases.