google_logging_organization_bucket_config

Manages a organization-level logging bucket config. For more information see the official logging documentation and Storing Logs.

Example Usage

data "google_organization" "default" {
    organization = "123456789"
}

resource "google_logging_organization_bucket_config" "basic" {
  organization   = data.google_organization.default.organization
  location       = "global"
  retention_days = 30
  bucket_id      = "_Default"

  index_configs  = {
    file_path = "jsonPayload.request.status"
    type      = "INDEX_TYPE_STRING"
  }
}

Argument Reference

The following arguments are supported:

The index_configs block supports:

Attributes Reference

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

Import

This resource can be imported using the following format:

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

import {
  id = "organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}"
  to = google_logging_organization_bucket_config.default
}

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

$ terraform import google_logging_organization_bucket_config.default organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}