Skip to content
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

Add support for providing additional HTTP headers #119

Closed
wants to merge 1 commit into from

Conversation

gw0
Copy link
Contributor

@gw0 gw0 commented Sep 24, 2020

Sometimes the Grafana server is behind a proxy or application firewall and it is necessary to provide additional HTTP headers to establish a connection, such as authentication tokens or cookies. In general sense these are represented as key-value pairs of strings. To also add support to provide these using an environment variable GRAFANA_HTTP_HEADERS it should contain a JSON-encoded values.

Usage:

provider "grafana" {
  url  = "http://172.17.0.1:3000"
  auth = "admin:admin"
  headers = {
    "Cookies" = "foo=bar"
  }
}
$ GRAFANA_HTTP_HEADERS='{"Cookies":"foo=bar"}' terraform plan

Depends on PR nytm/go-grafana-api#63.

@gw0
Copy link
Contributor Author

gw0 commented Nov 2, 2020

Due to changed dependency this PR was replaced with PR #134.

@gw0 gw0 closed this Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant