پرش به مطلب اصلی

arvancloud_cloudlogs_forwarder (Resource)

Manages a CloudLogs log forwarder.

Example Usage

resource "arvancloud_cloudlogs_forwarder" "splunk" {
name = "splunk-out"
description = "Forward logs to Splunk"
destination_type = "splunk"

destination_config {
endpoint = "https://splunk.example:8088"
hec_token = var.splunk_hec_token
}
}

resource "arvancloud_cloudlogs_forwarder" "http" {
name = "http-out"
description = "Forward logs to a custom HTTP endpoint"
destination_type = "http"

destination_config {
endpoint = "https://logs.example.com/ingest"
basic_auth_username = "logger"
basic_auth_password = var.http_basic_password
headers = {
"X-Source" = "arvancloud-cloudlogs"
}
}
}

variable "splunk_hec_token" {
type = string
sensitive = true
}

variable "http_basic_password" {
type = string
sensitive = true
}

Schema

Required

  • destination_config (Attributes) Destination-specific configuration. (see below for nested schema)
  • destination_type (String) Destination type: splunk or http.
  • name (String) Unique name of the log forwarder.

Optional

  • description (String) Optional description.

Read-Only

  • account_id (String) Account ID that owns the forwarder.
  • id (String) UUID of the log forwarder.

Nested Schema for destination_config

Optional:

  • basic_auth_password (String, Sensitive) HTTP basic auth password.
  • basic_auth_username (String) HTTP basic auth username.
  • endpoint (String) Destination endpoint URL.
  • headers (Map of String) Custom HTTP headers (max 10).
  • hec_token (String, Sensitive) Splunk HEC token.