support of input - JSON path from HTTP API
Closed this issue · 2 comments
Luubosi commented
Hi,
please, do provider support this type of input "JSON path from HTTP API"?
thanks
suzuki-shunsuke commented
Yes.
For example,
resource "graylog_input" "json_path" {
title = "json path"
type = "org.graylog2.inputs.misc.jsonpath.JsonPathInput"
global = "true"
attributes {
interval = 30
path = "$.userId"
throttling_allowed = true
target_url = "http://jsonplaceholder.typicode.com/posts/1"
source = "id"
timeunit = "SECONDS"
}
}
I can create an input now.
$ terraform version
Terraform v0.12.12
+ provider.graylog v8.1.0
$ terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# graylog_input.json_path will be created
+ resource "graylog_input" "json_path" {
+ created_at = (known after apply)
+ creator_user_id = (known after apply)
+ global = true
+ id = (known after apply)
+ static_fields = (known after apply)
+ title = "json path"
+ type = "org.graylog2.inputs.misc.jsonpath.JsonPathInput"
+ attributes {
+ interval = 30
+ path = "$.userId"
+ source = "id"
+ target_url = "http://jsonplaceholder.typicode.com/posts/1"
+ throttling_allowed = true
+ timeunit = "SECONDS"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
graylog_input.json_path: Creating...
graylog_input.json_path: Creation complete after 0s [id=5db1c1726df4af000f00b3a3]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Graylog 3.1.2
Luubosi commented
Nice, thanks very much.