google_logging_log_view

Describes a view over log entries in a bucket.

To get more information about LogView, see:

Example Usage - Logging Log View Basic

resource "google_logging_project_bucket_config" "logging_log_view" {
    project        = "my-project-name"
    location       = "global"
    retention_days = 30
    bucket_id      = "_Default"
}

resource "google_logging_log_view" "logging_log_view" {
  name        = "my-view"
  bucket      = google_logging_project_bucket_config.logging_log_view.id
  description = "A logging view configured with Terraform"
  filter      = "SOURCE(\"projects/myproject\") AND resource.type = \"gce_instance\" AND LOG_ID(\"stdout\")"
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

LogView can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import LogView using one of the formats above. For example:

import {
  id = "{{parent}}/locations/{{location}}/buckets/{{bucket}}/views/{{name}}"
  to = google_logging_log_view.default
}

When using the terraform import command, LogView can be imported using one of the formats above. For example:

$ terraform import google_logging_log_view.default {{parent}}/locations/{{location}}/buckets/{{bucket}}/views/{{name}}