This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Add organization ID to client connection using header. #62
Open
medains
wants to merge
1
commit into
nytm:master
Choose a base branch
from
medains:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This seems like the right place to do so - the resource API calls that require an organization ID that are not-quite RESTful also would need authentication with a user that is an administrator for the organization. So putting it in at this level works out, and also avoids adding orgID parameters all over the place. Co-authored-by: hansnqyr <[email protected]>
medains
added a commit
to medains/terraform-provider-grafana
that referenced
this pull request
Aug 5, 2020
Use the change in nytm/go-grafana-api#62 to apply an organization id to the provider. Usage might look like this: ```hcl provider "grafana" { url = "someurl" auth = "adminuser:somepass" } resource "grafana_organization" "neworg" { name = "neworg" admin = "neworgadmin" } provider "grafana" { alias = "neworg" url = "someurl" auth = "neworgadmin:somepass" org_id = grafana_organization.neworg.org_id } resource "grafana_data_source" "neworg_graphite" { provider = grafana.neworg type = "graphite" name = "neworg-graphite" } ```
medains
added a commit
to medains/terraform-provider-grafana
that referenced
this pull request
Aug 5, 2020
Use the change in nytm/go-grafana-api#62 to apply an organization id to the provider. Usage might look like this: ```hcl provider "grafana" { url = "someurl" auth = "adminuser:somepass" } resource "grafana_organization" "neworg" { name = "neworg" admin = "neworgadmin" } provider "grafana" { alias = "neworg" url = "someurl" auth = "neworgadmin:somepass" org_id = grafana_organization.neworg.org_id } resource "grafana_data_source" "neworg_graphite" { provider = grafana.neworg type = "graphite" name = "neworg-graphite" } ``` Co-authored-by: hansnqyr <[email protected]>
medains
added a commit
to medains/terraform-provider-grafana
that referenced
this pull request
Oct 16, 2020
Use the change in nytm/go-grafana-api#62 to apply an organization id to the provider. Usage might look like this: ```hcl provider "grafana" { url = "someurl" auth = "adminuser:somepass" } resource "grafana_organization" "neworg" { name = "neworg" admin = "neworgadmin" } provider "grafana" { alias = "neworg" url = "someurl" auth = "neworgadmin:somepass" org_id = grafana_organization.neworg.org_id } resource "grafana_data_source" "neworg_graphite" { provider = grafana.neworg type = "graphite" name = "neworg-graphite" } ``` Co-authored-by: hansnqyr <[email protected]>
Moved PR to grafana/grafana-api-golang-client#9 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This seems like the right place to do so - the resource API calls that
require an organization ID that are not-quite RESTful also would need
authentication with a user that is an administrator for the
organization. So putting it in at this level works out, and also avoids
adding orgID parameters all over the place.
Co-authored-by: hansnqyr [email protected]
This is a prelude to a PR on terraform-grafana-provider to fix this issue. It is similar to previous work under this PR: https://github.com/terraform-providers/terraform-provider-grafana/pull/60 - though the change in that PR is not what will result (it's far simpler).