Google Cloud (Stackdriver) Logging Organization Exclusion

This page shows how to write Terraform for Cloud (Stackdriver) Logging Organization Exclusion and write them securely.

google_logging_organization_exclusion (Terraform)

The Organization Exclusion in Cloud (Stackdriver) Logging can be configured in Terraform with the resource name google_logging_organization_exclusion. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "google_logging_organization_exclusion" "this" {
  description = var.description
  disabled    = var.disabled
  filter      = var.filter
  name        = var.name
  org_id      = var.org_id

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

A human-readable description.

Whether this exclusion rule should be disabled or not. This defaults to false.

The filter to apply when excluding logs. Only log entries that match the filter are excluded.

  • id optional computed - string
  • name required - string

The name of the logging exclusion.

Explanation in Terraform Registry

Manages an organization-level logging exclusion. For more information see:

  • API documentation
  • How-to Guides
    • Excluding Logs

      You can specify exclusions for log sinks created by terraform by using the exclusions field of google_logging_organization_sink

Frequently asked questions

What is Google Cloud (Stackdriver) Logging Organization Exclusion?

Google Cloud (Stackdriver) Logging Organization Exclusion is a resource for Cloud (Stackdriver) Logging of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Cloud (Stackdriver) Logging Organization Exclusion?

For Terraform, the niveklabs/google source code example is useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.