Skip to content

[Bug] elastic_kibana_slo.custom_metric should not require "field" when the aggregation type is "doc_count" #1085

Open
@anitahuang-accenture

Description

@anitahuang-accenture

Describe the bug
Custom metric SLO doesn't require the "field" field when creating the SLO manually, so the resource should not require "field" when the aggregation type is "doc_count"

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom metric SLO with the doc_count type of aggregation and field = "*" or field = null, adding the "filter" field with the desired filter

Expected behavior
SLO created

Debug output
2025-04-01T17:21:46.260-0300 [DEBUG] provider.terraform-provider-elasticstack_v0.11.1: {"statusCode":400,"error":"Bad Request","message":"Failed to validate: \n Excess keys are not allowed:\nbody.indicator.params.good.metrics.field\nbody.indicator.params.total.metrics.field","attributes":{"data":null}}

Versions (please complete the following information):

  • OS: [Linux]
  • Terraform Version [e.g. 1.6.6]
  • Provider version [e.g. v0.11.1]
  • Elasticsearch Version [e.g. 8.16.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions