-
Notifications
You must be signed in to change notification settings - Fork 381
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 template_variable_presets to datadog_dashboard #401
Add template_variable_presets to datadog_dashboard #401
Conversation
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.
Hey, thanks a lot for sending this PR! The code looks good and works like a charm. I left a small note inline to rebase on top of latest master. I'd also like to ask you to update the docs in website/docs/r/dashboard.html.markdown
to provide an example and docs of this feature (make website
and make website-test
will help you see if your changes look fine). Thanks!
go.mod
Outdated
@@ -6,7 +6,7 @@ require ( | |||
github.com/hashicorp/go-cleanhttp v0.5.0 | |||
github.com/hashicorp/terraform v0.12.5 | |||
github.com/kr/pretty v0.1.0 | |||
github.com/zorkian/go-datadog-api v2.25.0+incompatible | |||
github.com/zorkian/go-datadog-api v2.26.0+incompatible |
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.
Please rebase to latest master which already has this version.
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.
can do! I'll take care of this soon.
fc51f90
to
34566d4
Compare
@bkabrda done! Does this layout seem alright? |
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.
This is perfect, thanks! LGTM, merging this now.
This is a bit premature as zorkian/go-datadog-api#296 is still awaiting review, but I've confirmed it works when everything is hooked together properly:What
"Template Variable Presets" aka "Saved Views" are a quick shortcut that
can be added by hand or via json to dashboards in datadog, and appear in
the top left corner.
They allow you to string together common combinations of template
variable values, so if for example you want a "production us-east-2"
view of your dashboard, you could have a "production us-east-2" preset
that sets your template variables to
environment = production
andregion = us-east-2
.This PR adds support for template variable presets to dashboards, using the
new SDK functionality linked to above.
Cheers!