Closed jwilliams-fn closed 1 year ago
I should also add that if I do hardcode the token into the provider block, I still get the following error:
╷
│ Error: Missing required argument
│
│ with module.monolith.provider["registry.terraform.io/jdamata/sonarqube"],
│ on ../monolith/module.tf line 27, in provider "sonarqube":
│ 27: provider "sonarqube" {
│
│ "user": all of `pass,user` must be specified
Can you check if the doc/steps i have here works: https://github.com/jdamata/terraform-provider-sonarqube/pull/116
This works ok for me.
Ok that worked. Not sure what I did wrong 🤔
Thanks for your patience with my mistake 😅 and also thank you for adding the example to the docs!
Apologies re-opening. This worked with username/pass but it failed when I tried a token. Double checking before I forget
OK nvm everything is working fine! Just had to unset the SONAR_USER/PASS
Terraform Version
1.3.7
Affected Provider
Terraform Configuration Files
Expected Behavior
Sonarqube provider config should rely on environment variables for reading user, pass, token, host, etc. NOTE: Docs do mention that
host
is a required parameter, but if theSONAR_HOST
env var could be used I don't see why there needs to be a provider block at all.Our company runs in an environment where we do not use consistent usernames or passwords and all tokens rotate. We have no problem setting environment variables from kubernetes secrets though or on a one-off basis. All terraform code is checked into git so we avoid hard-coding passwords/token whenever possible.
Actual Behavior
Sonarqube provider returned the following errors:
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init
terraform plan
References