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

arvancloud_cloudlogs_sink (Resource)

Manages a CloudLogs log sink.

Example Usage

resource "arvancloud_cloudlogs_space" "main" {
name = "prod-logs"
region = "ir-central1"
retention_days = 30
}

# Route logs into a log space.
resource "arvancloud_cloudlogs_sink" "to_space" {
name = "store-all"
description = "Store audit logs in the production space"
destination_type = "logSpace"
destination_id = arvancloud_cloudlogs_space.main.name
inclusion_rule = "( logType == \"auditlogs.resourceAccess\" )"
}

# Route logs to an existing Splunk forwarder (by forwarder name).
resource "arvancloud_cloudlogs_sink" "to_splunk" {
name = "audit-to-splunk"
destination_type = "logForwarder"
destination_id = "splunk-out"
inclusion_rule = "( logType == \"auditlogs.resourceAccess\" )"
}

# Route logs to an existing HTTP forwarder (by forwarder name).
resource "arvancloud_cloudlogs_sink" "to_http" {
name = "audit-to-http"
destination_type = "logForwarder"
destination_id = "http-out"
inclusion_rule = "( logType == \"auditlogs.resourceAccess\" )"
}

Schema

Required

  • destination_id (String) Name of the target log space or forwarder.
  • destination_type (String) Destination type: logSpace or logForwarder.
  • name (String) Unique name of the log sink.

Optional

  • description (String) Optional description.
  • disabled (Boolean) Whether the sink is disabled.
  • exclusion_rule (String) ARQL exclusion rule.
  • inclusion_rule (String) ARQL inclusion rule.

Read-Only

  • account_id (String) Account ID that owns the sink.
  • id (String) UUID of the log sink.
  • status (String) Current lifecycle status of the log sink.