jdamata / terraform-provider-sonarqube

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

Incompatible with SonarQube v10+ #162

Closed freeranger closed 1 year ago

freeranger commented 1 year ago

A number of deprecated API properties were removed in SonarQube v10. The provider is still using these so is incompatible with v10. The integration tests will fail when run against the latest images - you can see the breaking issues in the output of my PR in my fork: https://github.com/freeranger/terraform-provider-sonarqube/pull/2 or if you run the action in https://github.com/jdamata/terraform-provider-sonarqube/pull/161

The issues are:

2023/04/28 10:44:33 [DEBUG] POST ***127.0.0.1:9000/api/rules/create?custom_key=basicRule&markdown_description=markdown_description&name=name&params=&prevent_reactivation=false&severity=INFO&status=READY&template_key=xml%3AXPathCheck&type=VULNERABILITY
--- FAIL: TestAccSonarqubeRuleDataSource (1.16s)
    data_source_sonarqube_rule_test.go:31: Step 1/1 error: Error running apply: exit status 1

        Error: API returned an error: The 'customKey' parameter is missing

          with sonarqube_rule.inrlbihaqx,
          on terraform_plugin_test.tf line 3, in resource "sonarqube_rule" "inrlbihaqx":
           3:       resource "sonarqube_rule" "inrlbihaqx" {

--- FAIL: TestAccSonarqubeGroupBasic (7.45s)
    resource_sonarqube_group_test.go:37: Step 4/4 error running import: exit status 1

        Error: The provider returned a resource missing an identifier during ImportResourceState. This is generally a bug in the resource implementation for import. Resource import code should not call d.SetId("") or create an empty ResourceData. If the resource is missing, instead return an error. Please report this to the provider developers.

--- FAIL: TestAccSonarqubeQualityprofileActivateRuleBasic (1.99s)
    resource_sonarqube_qualityprofile_activate_rule_test.go:48: Step 1/2 error: Error running apply: exit status 1

        Error: API returned an error: The 'customKey' parameter is missing

          with sonarqube_rule.jtuqefezqq,
          on terraform_plugin_test.tf line 8, in resource "sonarqube_rule" "jtuqefezqq":
           8:       resource "sonarqube_rule" "jtuqefezqq" {

--- FAIL: TestAccSonarqubeRuleBasic (0.97s)
    resource_sonarqube_rules_test.go:38: Step 1/2 error: Error running apply: exit status 1

        Error: API returned an error: The 'customKey' parameter is missing

          with sonarqube_rule.qhpwsfzaxx,
          on terraform_plugin_test.tf line 3, in resource "sonarqube_rule" "qhpwsfzaxx":
           3:       resource "sonarqube_rule" "qhpwsfzaxx" {
jdamata commented 1 year ago

Release v0.16.0 is cut and should have support for v10. Thanks for your work on this @freeranger