jdamata / terraform-provider-sonarqube

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

Crashing if apply wrong resource #261

Open huy105 opened 3 weeks ago

huy105 commented 3 weeks ago

crash

Terraform Version

Terraform v1.8.0

Code

resource "sonarqube_project" "main_project" {
    name       = var.name
    project    = var.project_key
    visibility = var.visibility

    setting {
        key   = "sonar.demo"
        value = "sonarqube@example.org"
    }
}

data "sonarqube_qualityprofile" "main" {
    name     = "db2c015b-5bd7-470b-aad5-76935393c45d"
}

resource "sonarqube_qualityprofile_project_association" "main" {
    quality_profile = data.sonarqube_qualityprofile.main.name
    project         = sonarqube_project.main_project.project
    language        = data.sonarqube_qualityprofile.main
}

Steps to Reproduce

When apply this code data.sonarqube_qualityprofile.main is not an attribute. It making plugin crashed and can't do anything then. I have to remove statefile to fix this problem.

huy105 commented 3 weeks ago

sonarqube_project work if delete setting