Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • audit_trails_trail

In this article:

  • Example usage
  • Schema
  • Required
  • Read-Only
  • Nested Schema for data_stream_destination
  • Nested Schema for filter
  • Nested Schema for filter.event_filters
  • Nested Schema for filter.event_filters.categories
  • Nested Schema for filter.event_filters.path_filter
  • Nested Schema for filter.event_filters.path_filter.any_filter
  • Nested Schema for filter.event_filters.path_filter.some_filter
  • Nested Schema for filter.event_filters.path_filter.some_filter.any_filters
  • Nested Schema for filter.path_filter
  • Nested Schema for filter.path_filter.any_filter
  • Nested Schema for filter.path_filter.some_filter
  • Nested Schema for filter.path_filter.some_filter.any_filters
  • Nested Schema for filtering_policy
  • Nested Schema for filtering_policy.data_events_filter
  • Nested Schema for filtering_policy.data_events_filter.dns_filter
  • Nested Schema for filtering_policy.data_events_filter.resource_scope
  • Nested Schema for filtering_policy.management_events_filter
  • Nested Schema for filtering_policy.management_events_filter.resource_scope
  • Nested Schema for logging_destination
  • Nested Schema for storage_destination
  1. Terraform reference
  2. Resources
  3. Audit Trails
  4. Data Sources
  5. audit_trails_trail

yandex_audit_trails_trail (Data Source)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example usage
  • Schema
    • Required
    • Read-Only
    • Nested Schema for data_stream_destination
    • Nested Schema for filter
    • Nested Schema for filter.event_filters
    • Nested Schema for filter.event_filters.categories
    • Nested Schema for filter.event_filters.path_filter
    • Nested Schema for filter.event_filters.path_filter.any_filter
    • Nested Schema for filter.event_filters.path_filter.some_filter
    • Nested Schema for filter.event_filters.path_filter.some_filter.any_filters
    • Nested Schema for filter.path_filter
    • Nested Schema for filter.path_filter.any_filter
    • Nested Schema for filter.path_filter.some_filter
    • Nested Schema for filter.path_filter.some_filter.any_filters
    • Nested Schema for filtering_policy
    • Nested Schema for filtering_policy.data_events_filter
    • Nested Schema for filtering_policy.data_events_filter.dns_filter
    • Nested Schema for filtering_policy.data_events_filter.resource_scope
    • Nested Schema for filtering_policy.management_events_filter
    • Nested Schema for filtering_policy.management_events_filter.resource_scope
    • Nested Schema for logging_destination
    • Nested Schema for storage_destination

Get information about a trail. For information about the trail concept, see official documentation.

Example usageExample usage

//
// Get information about existing Audit Trails Trail
//
data "yandex_audit_trails_trail" "basic-trail" {
  trail_id = "cnpqe**********sh835"
}

SchemaSchema

RequiredRequired

  • trail_id (String) Trail ID.

Read-OnlyRead-Only

  • data_stream_destination (List of Object) Structure describing destination data stream of the trail. Mutually exclusive with logging_destination and storage_destination. (see below for nested schema)
  • description (String) The resource description.
  • filter (Set of Object, Deprecated) Structure is deprecated. Use filtering_policy instead. (see below for nested schema)
  • filtering_policy (List of Object) Structure describing event filtering process for the trail. Mutually exclusive with filter. At least one of the management_events_filter or data_events_filter fields will be filled. (see below for nested schema)
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • id (String) The ID of this resource.
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • logging_destination (List of Object) Structure describing destination log group of the trail. Mutually exclusive with storage_destination and data_stream_destination. (see below for nested schema)
  • name (String) The resource name.
  • service_account_id (String) Service account which linked to the resource.
  • status (String) Status of this trail.
  • storage_destination (List of Object) Structure describing destination bucket of the trail. Mutually exclusive with logging_destination and data_stream_destination. (see below for nested schema)

Nested Schema for Nested Schema for data_stream_destination

Read-Only:

  • database_id (String) ID of the YDB hosting the destination data stream.

  • stream_name (String) Name of the YDS stream belonging to the specified YDB.

Nested Schema for Nested Schema for filter

Read-Only:

  • event_filters (Block List) Deprecated. (see below for nested schema)

  • path_filter (Block List, Max: 1) Deprecated. (see below for nested schema)

Nested Schema for Nested Schema for filter.event_filters

Read-Only:

  • categories (Block List, Min: 1) Deprecated. (see below for nested schema)

  • path_filter (Block List, Min: 1, Max: 1) Deprecated. (see below for nested schema)

  • service (String) Deprecated.

Nested Schema for Nested Schema for filter.event_filters.categories

Read-Only:

  • plane (String) Deprecated.

  • type (String) Deprecated.

Nested Schema for Nested Schema for filter.event_filters.path_filter

Read-Only:

  • any_filter (Block List, Max: 1) Deprecated. (see below for nested schema)

  • some_filter (Block List, Max: 1) Deprecated. (see below for nested schema)

Nested Schema for Nested Schema for filter.event_filters.path_filter.any_filter

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for filter.event_filters.path_filter.some_filter

Read-Only:

  • any_filters (Block List, Min: 1) Deprecated. (see below for nested schema)

  • resource_id (String) Deprecated.

  • resource_type (String) Deprecated.

Nested Schema for Nested Schema for filter.event_filters.path_filter.some_filter.any_filters

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for filter.path_filter

Read-Only:

  • any_filter (Block List, Max: 1) Deprecated. (see below for nested schema)

  • some_filter (Block List, Max: 1) Deprecated. (see below for nested schema)

Nested Schema for Nested Schema for filter.path_filter.any_filter

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for filter.path_filter.some_filter

Read-Only:

  • any_filters (Block List, Min: 1) Deprecated. (see below for nested schema)

  • resource_id (String) Deprecated.

  • resource_type (String) Deprecated.

Nested Schema for Nested Schema for filter.path_filter.some_filter.any_filters

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for filtering_policy

Read-Only:

  • data_events_filter (Block List) Structure describing filtering process for the service-specific data events. (see below for nested schema)

  • management_events_filter (Block List, Max: 1) Structure describing filtering process for management events. (see below for nested schema)

Nested Schema for Nested Schema for filtering_policy.data_events_filter

Read-Only:

  • dns_filter (Block List, Max: 1) Specific filter for DNS service. (see below for nested schema)

  • excluded_events (List of String) A list of events that won't be gathered by the trail from this service. New events will be automatically gathered when this option is specified. Mutually exclusive with included_events.

  • included_events (List of String) A list of events that will be gathered by the trail from this service. New events won't be gathered by default when this option is specified. Mutually exclusive with excluded_events.

  • resource_scope (Block List, Min: 1) Structure describing that events will be gathered from the specified resource. (see below for nested schema)

  • service (String) ID of the service which events will be gathered.

Nested Schema for Nested Schema for filtering_policy.data_events_filter.dns_filter

Read-Only:

  • include_nonrecursive_queries (Boolean) All types of queries will be delivered.

Nested Schema for Nested Schema for filtering_policy.data_events_filter.resource_scope

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for filtering_policy.management_events_filter

Read-Only:

  • resource_scope (Block List, Min: 1) Structure describing that events will be gathered from the specified resource. (see below for nested schema)

Nested Schema for Nested Schema for filtering_policy.management_events_filter.resource_scope

Read-Only:

  • resource_id (String) Resource ID.

  • resource_type (String) Resource type.

Nested Schema for Nested Schema for logging_destination

Read-Only:

  • log_group_id (String) ID of the destination Cloud Logging Group.

Nested Schema for Nested Schema for storage_destination

Read-Only:

  • bucket_name (String) Name of the destination bucket.

  • object_prefix (String) Additional prefix of the uploaded objects. If not specified, objects will be uploaded with prefix equal to trail_id.

Was the article helpful?

Previous
alb_virtual_host
Next
audit_trails_trail
© 2025 Direct Cursus Technology L.L.C.