Skip to content

sonarqube_github_binding not replaced if sonarqube project it is attached to is replaced #260

Description

@deepbrook

When Terraform recreates a sonarqube project, any attached github bindings are not recreated automatically, causing an error on the next plan action.

Terraform Version

1.8.4

Affected Resource(s)

  • sonarqube_project
  • sonarqube_github_binding

Terraform Configuration Files

resource sonarqube_project "this" {
  key = "my-project"
  name = "My Project"
}

resource sonarqube_github_binding "this" {
  project = sonarqube_project.this.key
  alm_key = "github"
}

Expected Behavior

If the SonarQube project is marked for replacement, the sonarqub_github_binding should be marked for replacement, too.

Actual Behavior

The binding isn't marked and the apply action runs to completion. Upon the next plan action, the sonarqube_github_binding resource raises an error, stating the target project isnt bound to any github integration.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. modify the name attribute
  3. terraform apply - the project is replaced
  4. terraform plan - the binding resource raises an error, because it cannot find the project it was bound to.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions