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 data_source_dashboards #378
add data_source_dashboards #378
Conversation
@inkel builds don't appear to be working |
Hi, @justinTM, thanks again for your contributions. I've got a question: how's this PR different from #378? Both have the same title and seem to be adding the same kind of data source. Also, I'm not so sure about this one. We already have a Let's stop development on this one temporarily while we discuss it with the rest of the maintainers. Thanks! |
…m-provider-grafana into data_source_dashboards
hey @inkel , they are virtually the same PRs; i was trying to see if i could trigger the CI build using a different branch. i would love to pause development honestly, but unfortunately there is a vulnerability in the way grafana provisioning (with terraform) mixes with user-created dashboards: dashboards in provisioned folders will be lost forever. the organization i'm working with has been experiencing this issue with increasing frequency lately. from a development standpoint, i'm testing cURL requests directly to the API with good (sometimes unexpected) results. i would just use shell commands in the project but keeping everything maintained by terraform is preferable.
if i can refactor the dashboard folder search function in the client and use it successfully, i think this PR will be ready for review. |
…ypeList with element TypeMap
@inkel wow what a relief. I finally figured it out. There's a bug in the testing framework from Hashicorp: hashicorp/terraform-plugin-sdk#885 |
This reverts commit eb16617.
hey @inkel our team needs this ASAP if I could bother you for a review. |
the tests are passing |
@julienduchesne do you know of a way to utilize a forked repo without publishing to the Hashicorp Registry? |
You can write custom versions of a provider (or completely create a new one) locally Here's what I use from my repo:
Then my Grafana config looks like this:
|
As an alternative, if you use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon first review looks quite good, however, we cannot accept the replace
directive in go.mod
.
@inkel i know, it's just to get passing tests until client PR is merged |
must be merged together with grafana/grafana-api-golang-client#59 i'll remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo rebasing on master + the two comments I added
727dbe7
to
ef20780
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for your work and patience!
grafana/data_source_dashboards.go
Outdated
sort.Strings(paramsList) | ||
hashIn := strings.Join(paramsList, "") | ||
hashOut.Write([]byte(hashIn)) | ||
return fmt.Sprintf("%x", hashOut.Sum(nil))[0:23] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, any reason why returning just 24 characters?
Co-authored-by: Leandro López <inkel.ar@gmail.com>
builds haven't been initiating so trying new fresh branch