Open milosz opened 4 years ago
max_size property is also referenced in the https://github.com/suzuki-shunsuke/go-graylog/blob/master/docs/resources/index_set.md
Thank you for your information.
I guess this is a change of the Graylog API.
I don't confirm yet but I think the older Graylog supports the max_size
.
I want to know which version the change is added.
There are likely more changes in Graylog API. I do not know about earlier Graylog API versions, but it looks like there are some similarities between dashboards and views which now makes the resource:
resource "graylog_dashboard" "log_sources" {
title = "sources"
description = "sources"
}
plan:
Terraform will perform the following actions:
# graylog_dashboard.log_sources will be created
+ resource "graylog_dashboard" "log_sources" {
+ created_at = (known after apply)
+ description = "sources"
+ id = (known after apply)
+ title = "sources"
}
Plan: 1 to add, 0 to change, 0 to destroy.
fail in execution:
Error: failed to create a dashboard: status code: 405, {"type":"ApiError","message":"HTTP 405 Method Not Allowed"}: status code >= 300
on graylog.tf line 137, in resource "graylog_dashboard" "log_sources":
137: resource "graylog_dashboard" "log_sources" {
Useful reading about Dashboard API changes:
Environment
Overview
Example https://github.com/suzuki-shunsuke/go-graylog/blob/master/examples/v0.11/index_set.tf uses max_size property in rotation_strategy, but as of now it is not defined in web interface or api browser.
How to reproduce
For terraform code (same as above example, only different name):
Terraform returns:
Removing "max_size = 0" (rotation_strategy) property solves problem.
JSON from api does not contain this field.