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

elasticstack_kibana_slo time_window > duration docs suggest any duration can be used #732

Open
ethanhutchins33 opened this issue Aug 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ethanhutchins33
Copy link

Describe the bug
On the docs for the elasticstack_kibana_slo resource, under time_window > duration it suggests any duration can be used above 1d:

"Any duration greater than 1 day can be used: days, weeks, months, quarters, years."

However, this is not the case. As mentioned in this section of the technical documentation, only values of 7d, 30d and 90d can be used for the rolling time_window type.

Using any value other than the 3 specified above causes a 400 bad request.

To Reproduce
Steps to reproduce the behavior:

  1. Create an elasticstack_kibana_slo resource where the time_window > duration value is set to anything other than 7d, 30d and 90d.
  2. Run terraform init, plan, apply and this will fail with a 400 error.
resource "elasticstack_kibana_slo" "slo" {
  name        = var.name
  description = var.description

  kql_custom_indicator {
    index           = var.index
    good            = var.good_query
    total           = var.total_query
    filter          = var.filter_query
    timestamp_field = "@timestamp"
  }

  time_window {
    duration = "4d"
    type     = "rolling"
  }

  budgeting_method = var.budgeting_method

  objective {
    target = var.slo_objective
  }
}

Expected behavior
Either to add this functionality or to update the docs to be more clear about what values can be used so we don't have to dig through the repo for this information.

Debug output
I can't provide TRACE level debug as this is running on our build agents but here is the 400 error we see in the pipeline:

│ Error: 400 Bad Request
│ 
│   with module.XXXXXXXXX.module.slo.module.slo.elasticstack_kibana_slo.slo,
│   on ../XXXXX/XXXXXX/custom-slo/main.tf line 11, in resource "elasticstack_kibana_slo" "slo":
│   11: resource "elasticstack_kibana_slo" "slo" {

Screenshots
NA

Versions (please complete the following information):

  • OS: Linux
  • Terraform Version: v1.9.5
  • Provider Version: v0.11.6
  • Elasticsearch Version: 8.12

Additional context
This is less about a bug and more about updating the docs to be clear. We are using 30d for the time being which works fine.

@ethanhutchins33 ethanhutchins33 added the bug Something isn't working label Aug 28, 2024
@ethanhutchins33 ethanhutchins33 changed the title elasticstack_kibana_slo time_window_duration docs suggest any duration can be used elasticstack_kibana_slo time_window > duration docs suggest any duration can be used Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant