Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Import all relevant attributes during `elasticstack_fleet_output` import ([#522](https://github.com/elastic/terraform-provider-elasticstack/pull/522))
- Fix issue when setting `override` in `elasticstack_kibana_data_view` resource ([#550](https://github.com/elastic/terraform-provider-elasticstack/pull/550))
- Fixup typos in `elasticstack_elasticsearch_transform` and `elasticstack_kibana_security_role` docs ([#551](https://github.com/elastic/terraform-provider-elasticstack/pull/551))
- Fix issue when setting `field_attrs` in `elasticstack_kibana_data_view` resource ([#552](https://github.com/elastic/terraform-provider-elasticstack/pull/552))

## [0.11.0] - 2023-12-12

Expand Down
4 changes: 4 additions & 0 deletions internal/kibana/data_view/acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestAccResourceDataView(t *testing.T) {
resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_formats.event_time.id", "date_nanos"),
resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_formats.machine.ram.params.pattern", "0,0.[000] b"),
resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.runtime_field_map.runtime_shape_name.script_source", "emit(doc['shape_name'].value)"),
resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_attrs.ingest_failure.custom_label", "error.ingest_failure"),
),
},
{
Expand Down Expand Up @@ -107,6 +108,9 @@ resource "elasticstack_kibana_data_view" "dv" {
script_source = "emit(doc['shape_name'].value)"
}
}
field_attrs = {
ingest_failure = { custom_label = "error.ingest_failure", count = 6 },
}
}
}`, indexName, indexName, indexName)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/kibana/data_view/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ type apiRuntimeFieldV0 struct {
}

type fieldAttr struct {
CustomLabel *string `tfsdk:"customLabel"`
Count *int64 `tfsdk:"count"`
CustomLabel *string `json:"customLabel"`
Count *int64 `json:"count"`
}

type runtimeField struct {
Expand Down