Open buddhamangler-cbre opened 7 months ago
I have the same problem.
On Community or Enterprise, it works fine, just with the DataCenter edition it happens.
You can add installed_version and installed_edition to the provider as a quick fix.
Thank you for the detailed write up! This looks like something that should definitely be fixed.
This provider (0.16.9) is not initializing correctly during the version and edition check...
We are using SonarQube 9.9.2.77730 with DataCenter edition deployed in K8s as a cluster of 3 nodes.
https://github.com/jdamata/terraform-provider-sonarqube/blob/c8754edb9fc08f0b9ec3e96fa0d9e79c433ccd83/sonarqube/provider.go#L164
The issue is the code is checking the system information here...
https://github.com/jdamata/terraform-provider-sonarqube/blob/c8754edb9fc08f0b9ec3e96fa0d9e79c433ccd83/sonarqube/provider.go#L204
It expects two properties out of the system information call it makes...
The problem is that our SQ instance is returning this for that section in the json (with redactions)...
As you can see, System.Version is not present. It is however present in another section of the returned json in each of the objects of an array with key "Application Nodes"...
Perhaps the system information is returned this way in clusters? The system information check should account for this.
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.N/A
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
What should have happened?
The provider initialization should have worked.
Actual Behavior
What actually happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: