suzuki-shunsuke / go-graylog

Graylog API client for Go and terraform provider for Graylog
https://github.com/terraform-provider-graylog/terraform-provider-graylog
MIT License
45 stars 12 forks source link

failed to import input #73

Closed suzuki-shunsuke closed 5 years ago

suzuki-shunsuke commented 5 years ago

input

{
  "title": "raw_kafka",
  "global": true,
  "name": "Raw/Plaintext Kafka",
  "content_pack": null,
  "created_at": "2019-03-14T12:09:26.282Z",
  "type": "org.graylog2.inputs.raw.kafka.RawKafkaInput",
  "creator_user_id": "admin",
  "attributes": {
    "topic_filter": "test-kafka",
    "fetch_wait_max": 100,
    "offset_reset": "largest",
    "zookeeper": "127.0.0.1:2181",
    "throttling_allowed": false,
    "fetch_min_bytes": 5,
    "threads": 2,
    "override_source": null
  },
  "static_fields": {},
  "node": null,
  "id": "5c8a4476c9e77c00017790ba"
}
$ terraform import graylog_input.gelf_kafka 5c8a4476c9e77c00017790ba
graylog_input.gelf_kafka: Importing from ID "5c8a4476c9e77c00017790ba"...
graylog_input.gelf_kafka: Import complete!
  Imported graylog_input (ID: 5c8a4476c9e77c00017790ba)
graylog_input.gelf_kafka: Refreshing state... (ID: 5c8a4476c9e77c00017790ba)

Error: graylog_input.gelf_kafka (import id: 5c8a4476c9e77c00017790ba): 1 error(s) occurred:

* import graylog_input.gelf_kafka result: 5c8a4476c9e77c00017790ba: graylog_input.gelf_kafka: Invalid address to set: []string{"attributes", "0", "Data"}
suzuki-shunsuke commented 5 years ago

We have to add InputTypeRawKafka .