-
Notifications
You must be signed in to change notification settings - Fork 248
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
Provider cannot connect to Grafana instance, throws 401 Unauthorized #77
Comments
You have a semicolon between your username and password |
Same issue, and as @neocorp said, using the API Token doesn't work either, and that does not require a colon or semicolon. |
Do you have basic_auth enabled? It seems username/password combo only works with basic_auth enabled.https://grafana.com/docs/grafana/latest/http_api/auth/#basic-auth |
Mine was as simple as updating the url to use https, it seems. The semicolon may be part of the original issue, but v1.5 of the provider is also available, so I'm not sure if that would make a difference. |
I've tried with colon, semicolon, added basic_auth_enabled flag and almost every possible combination but no luck. Mine is on https already and also tried with v1.5 of the provider, still no luck. Any help is really appreciated, I'd rather implement these datasources and dashboards with Terraform. |
Maybe some of you are running into this issue: nytm/go-grafana-api#41 Took me a while to figure out, that colons ( |
The colons-in-passwords issue was patched upstream (thanks @pascal-hofmann!) and will be included in the next release. 401 errors typically aren't the fault of the provider itself, though if there's other issues with how we're parsing/passing credentials that'd definitely be something to address |
This should be fixed when a release of the provided is cut (see #97). |
Hi! Thank you for reporting this, and sorry for the long delay it took us to get back in touch. After careful consideration we're going to close this one, as it refers to outdated versions of both the Grafana provider and Terraform itself. If you continue to experience this issue please try again with the latest versions of both tools mentioned above, and otherwise reopen this issue. Thanks for understanding. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.12.16
Affected Resource(s)
Issue seems to be with Grafana provider itself, it cannot seem to authenticate.
Terraform Configuration Files
Debug Output
https://gist.github.com/neocorp/72468d6c33c34dafabc6c97f6cc662cf
Panic Output
N/A
Expected Behavior
Grafana provider should be able to connect to Grafana and create the data sources.
Actual Behavior
Terraform throws 401 Unauthorized error. Using username/password combination or API Token from Grafana doesn't make a difference, produces the same error.
Steps to Reproduce
terraform init
terraform apply
Important Factoids
Grafana instance is running on ECS Fargate and accessible for terraform environment.
Issue can also be reproduced with 1.5 Grafana provider version.
The text was updated successfully, but these errors were encountered: