terraform provider for Graylog.
Download binary and install it.
https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
https://quay.io/repository/suzuki_shunsuke/terraform-graylog
Docker image which is installed terraform and terraform-provider-graylog on Alpine.
provider "graylog" {
web_endpoint_uri = "${var.web_endpoint_uri}"
auth_name = "${var.auth_name}"
auth_password = "${var.auth_password}"
}
// Role my-role-2
resource "graylog_role" "my-role-2" {
name = "my-role-2"
permissions = ["users:edit"]
description = "Created by terraform"
}
And please see example v0.11 and example v0.12 also.
name | Environment variable | description |
---|---|---|
web_endpoint_uri | GRAYLOG_WEB_ENDPOINT_URI | API endpoint, for example https://graylog.example.com/api |
auth_name | GRAYLOG_AUTH_NAME | Username or API token or Session Token |
auth_password | GRAYLOG_AUTH_PASSWORD | Password or the literal "token" or "session" |
About auth_name
and auth_password
, please see the Graylog's Documentation.
You can authenticate with either password or access token or session token.
password
auth_name = "<user name>"
auth_password = "<password>"
access token
auth_name = "<access token>"
auth_password = "token"
session token
auth_name = "<session token>"
auth_password = "session"
name | Environment variable | default | description |
---|---|---|---|
x_requested_by | GRAYLOG_X_REQUESTED_BY | terraform-go-graylog | X-Requested-By Header |
api_version | GRAYLOG_API_VERSION | "v2" | Graylog's API version. The default value is "v2" for compatibility. If you use Graylog v3, please set "v3". |
- alarm_callback
- alert_condition
- dashboard
- dashboard_widget
- dashboard_widget_positions
- extractor
- event_definition
- event_notification
- grok_pattern
- index_set
- input
- input_static_fields
- ldap_setting
- output
- pipeline
- pipeline_rule
- pipeline_connection
- role
- stream
- stream_output
- stream_rule
- user
We can't support these resources for some reasons.
We can't support these resources because graylog API doesn't return the created resource id (response body: no content).
The following APIs doesn't return the created resource id (response body: no content).
- POST /plugins/org.graylog.plugins.collector/configurations/{id}/inputs Create a configuration input
- POST /plugins/org.graylog.plugins.collector/configurations/{id}/outputs Create a configuration output
- POST /plugins/org.graylog.plugins.collector/configurations/{id}/snippets Create a configuration snippet