Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
deepbrook opened this issue Jun 11, 2024 · 1 comment

Comments

@deepbrook
Copy link

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.
@smokedlinq
Copy link
Contributor

This same behavior is if the sonarqube_alm_github resource is replaced because of key/secret rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants