google_logging_folder_bucket_config

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

Example Usage

resource "google_folder" "default" {
  display_name = "some-folder-name"
  parent       = "organizations/123456789"
}

resource "google_logging_folder_bucket_config" "basic" {
  folder         = google_folder.default.name
  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 = "folders/{{folder}}/locations/{{location}}/buckets/{{bucket_id}}"
  to = google_logging_folder_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_folder_bucket_config.default folders/{{folder}}/locations/{{location}}/buckets/{{bucket_id}}