terraform-provider-grafana
terraform-provider-grafana copied to clipboard
[feature request] Terraform should able to read the auth from a file ~/.grafana-auth
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
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.
Terraform v0.11.14
Terraform Configuration Files
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
Expected Behavior
auth - (Required) The API token or username/password to use to authenticate to the Grafana server. If username/password is used, they are provided in a single string and separated by a colon. May alternatively be set via the GRAFANA_AUTH environment variable.
If none supplied, Terraform should to read it from ~/.grafana-auth
Actual Behavior
auth - (Required) The API token or username/password to use to authenticate to the Grafana server. If username/password is used, they are provided in a single string and separated by a colon. May alternatively be set via the GRAFANA_AUTH environment variable.
provider.grafana.auth Credentials for accessing the Grafana API.
Enter a value:
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
-
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
- GH-1234
I can see the value in adding this--feel free to submit a PR to do this!
You can use the Terraform file
function for this:
provider "grafana" {
url = "https://my-instance.grafana.net/"
auth = file("~/.grafana-auth")
}