Manages an organization-level logging exclusion. For more information see:
resource "google_logging_organization_exclusion" "my-exclusion" {
name = "my-instance-debug-exclusion"
org_id = "123456789"
description = "Exclude GCE instance debug logs"
# Exclude all DEBUG or lower severity messages relating to instances
filter = "resource.type = gce_instance AND severity <= DEBUG"
}
The following arguments are supported:
name
- (Required) The name of the logging exclusion.
org_id
- (Required) The organization to create the exclusion in.
description
- (Optional) A human-readable description.
disabled
- (Optional) Whether this exclusion rule should be disabled or not. This defaults to
false.
filter
- (Required) The filter to apply when excluding logs. Only log entries that match the filter are excluded.
See Advanced Log Filters for information on how to
write a filter.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format organizations/{{organization}}/exclusions/{{name}}
Organization-level logging exclusions can be imported using their URI, e.g.
organizations/{{organization}}/exclusions/{{name}}
In Terraform v1.5.0 and later, use an import
block to import organization-level logging exclusions using one of the formats above. For example:
import {
id = "organizations/{{organization}}/exclusions/{{name}}"
to = google_logging_organization_exclusion.default
}
When using the terraform import
command, organization-level logging exclusions can be imported using one of the formats above. For example:
$ terraform import google_logging_organization_exclusion.default organizations/{{organization}}/exclusions/{{name}}