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

[datadog_dashboard] Add slo datasource to dash widget formulas and functions query #1924

Merged
merged 8 commits into from
May 19, 2023

Conversation

zhengshizhao
Copy link
Contributor

@zhengshizhao zhengshizhao commented May 18, 2023

To add terraform support to add slo datasources to Formulas and Functions query in widget.
jira ticket https://datadoghq.atlassian.net/browse/SLOS-1386

related [open-api PR] https://github.com/DataDog/datadog-api-spec/pull/2201

tested provider in local to create/update dash:

resource "datadog_dashboard" "slo_dashboard" {
  title        = "zhengshi test"
  description  = "Created using the Datadog provider in Terraform"
  layout_type  = "ordered"

  widget {
    timeseries_definition {
      request {
        formula {
          formula_expression = "a"
          alias = "slo"
        }
        query {
          slo_query {
            data_source = "slo"
            slo_id      = "51991ecc819552258314b808a80840c2"
            measure       = "slo_status"
            group_mode = "overall"
            name = "a"
          }
        }
      }
    }
    widget_layout {
      height = 5
      width  = 4
      x      = 4
      y      = 5
    }
  }

@zhengshizhao zhengshizhao marked this pull request as ready for review May 18, 2023 22:17
@zhengshizhao zhengshizhao requested review from a team as code owners May 18, 2023 22:17
estherk15
estherk15 previously approved these changes May 19, 2023
@nkzou nkzou merged commit e6ce403 into master May 19, 2023
8 checks passed
@nkzou nkzou deleted the zhengshi/add-slo-ff-to-widget branch May 19, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants