jdamata / terraform-provider-sonarqube

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

Error in the documentation on the terraform page #199

Closed humpalu closed 9 months ago

humpalu commented 10 months ago

Hi there,

Thank you for opening an issue.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed. Terraform v1.4.5

Expected Behavior

What should have happened?

sonarqube_qualityprofile_project_association should be created

Actual Behavior

The example on the follwing page https://registry.terraform.io/providers/jdamata/sonarqube/latest/docs/resources/sonarqube_qualityprofile_project_association

has an error in the example in this block

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

should be

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

since the project association should be mapped to sonarqube_project.project

humpalu commented 10 months ago

Another Typo on the https://registry.terraform.io/providers/jdamata/sonarqube/latest/docs/resources/sonarqube_new_code_periods page

resource "sonarqube_new_code_period" "reference" {
  project = sonarqube_project.reference.project
  type = "REFERENCE_BRANCH"
  value = "main"

should be

resource "sonarqube_new_code_periods" "reference" {
  project = sonarqube_project.reference.project
  type = "REFERENCE_BRANCH"
  value = "main"
}
jdamata commented 9 months ago

@humpalu Thanks! Fixed here: https://github.com/jdamata/terraform-provider-sonarqube/commit/1fd2cf0ff580566647c5a841448046e07e4f300a