googleLoggingLogView
The Logging LogView resource
Example Usage - basic
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleLoggingProjectBucketConfigBasic =
new google.loggingProjectBucketConfig.LoggingProjectBucketConfig(
this,
"basic",
{
bucket_id: "_Default",
location: "global",
project: "my-project-name",
retention_days: 30,
}
);
new google.loggingLogView.LoggingLogView(this, "primary", {
bucket: googleLoggingProjectBucketConfigBasic.id,
description: "A logging view configured with Terraform",
filter:
'SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")',
name: "view",
});
Argument Reference
The following arguments are supported:
-
bucket
- (Required) The bucket of the resource -
name
- (Required) The resource name of the view. For example:projects/myProject/locations/global/buckets/myBucket/views/myView
-
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") -
location
- (Optional) The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. -
parent
- (Optional) The parent of the resource.
Attributes Reference
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}}
-
createTime
- Output only. The creation timestamp of the view. -
updateTime
- Output only. The last update timestamp of the view.
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
LogView can be imported using any of these accepted formats: