terraform-provider-grafana icon indicating copy to clipboard operation
terraform-provider-grafana copied to clipboard

[feature request] Terraform should able to read the auth from a file ~/.grafana-auth

Open ssala7 opened this issue 5 years ago • 1 comments

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:

  1. 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

ssala7 avatar Aug 23 '19 07:08 ssala7

I can see the value in adding this--feel free to submit a PR to do this!

mlclmj avatar Apr 18 '20 05:04 mlclmj

You can use the Terraform file function for this:

provider "grafana" {
  url  = "https://my-instance.grafana.net/"
  auth = file("~/.grafana-auth")
}

julienduchesne avatar Aug 28 '22 17:08 julienduchesne