terraform-provider-datadog icon indicating copy to clipboard operation
terraform-provider-datadog copied to clipboard

[Feature request] Support for `storage` attribute on dashboard log queries

Open peaonunes opened this issue 2 years ago • 0 comments

The Datadog Dashboard and querying UI allow us to choose either Indexes or Online Archives storage options. image

However, that is not supported yet on the terraform API. At least as far as I can see by checking the dashboard API guideline and repository documentation; https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/dashboard

There is no mention of storage, and naturally, the terraform API complains about attempts of its usage.

Terraform Version

Terraform v1.2.4 registry.terraform.io/datadog/datadog v3.14.0

Affected Resource(s)

  • datadog_dashboard

Terraform Configuration Files

#...
event_query {
  data_source = "logs"
  storage = "online_archives"
  indexes = [
    "*",
  ]
  name = "query1"

  compute {
    aggregation = "count"
    interval    = 0
  }

  search {
    query = "..."
  }
}
# ...

Expected Behavior

The TF API should have accepted the storage option and highlighted it in the changes.

Actual Behavior

The TF API complains about the unsupported storage argument.

╷
│ Error: Unsupported argument
│
│   on modules/datadog/dashboard.tf line 681, in resource "datadog_dashboard" "edge":
│  681:             storage = "online_archives"
│
│ An argument named "storage" is not expected here.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a datadog_dashboard.
  2. Create a query.
  3. Create an event_query, use data_source = logs fill required fields.
  4. Try adding storage = "online_archives".
  5. Try terraform plan

peaonunes avatar Aug 30 '22 05:08 peaonunes