Describes a view over log entries in a bucket.
To get more information about LogView, see:
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\")"
}
The following arguments are supported:
name
-
(Required)
The resource name of the view. For example: `projects/my-project/locations/global/buckets/my-bucket/views/my-view`
bucket
-
(Required)
The bucket of the resource
description
-
(Optional)
Describes this view.
filter
-
(Optional)
Filter that restricts which log entries in a bucket are visible in this view. Filters are restricted to be a logical AND of ==/!= of any of the following: - originating project/folder/organization/billing account. - resource type - log id For example: SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
parent
-
(Optional)
The parent of the resource.
location
-
(Optional)
The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{parent}}/locations/{{location}}/buckets/{{bucket}}/views/{{name}}
create_time
-
Output only. The creation timestamp of the view.
update_time
-
Output only. The last update timestamp of the view.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.LogView can be imported using any of these accepted formats:
{{parent}}/locations/{{location}}/buckets/{{bucket}}/views/{{name}}
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}}