<commit_before># Log Export: BigQuery destination submodule

This submodule allows you to configure a BigQuery dataset destination that
can be used by the log export created in the root module.

## Usage

The [examples](../../examples) directory contains directories for each destination, and within each destination directory are directories for each parent resource level. Consider the following
example that will configure a BigQuery dataset destination and a log export at the project level:

```hcl
module "log_export" {
  source                 = "terraform-google-modules/log-export/google"
  destination_uri        = "${module.destination.destination_uri}"
  filter                 = "severity >= ERROR"
  log_sink_name          = "bigquery_example_logsink"
  parent_resource_id     = "sample-project"
  parent_resource_type   = "project"
  unique_writer_identity = true
}

module "destination" {
  source                   = "terraform-google-modules/log-export/google//modules/bigquery"
  project_id               = "sample-project"
  dataset_name             = "sample_dataset"
  log_sink_writer_identity = "${module.log_export.writer_identity}"
}
```

At first glance that example seems like a circular dependency as each module declaration is
using an output from the other, however Terraform is able to collect and order all the resources
so that all dependencies are met.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| dataset\_name | The name of the bigquery dataset to be created and used for log entries matching the filter. | string | n/a | yes |
| default\_table\_expiration\_ms | Default table expiration time (in ms) | string | `"3600000"` | no |
| delete\_contents\_on\_destroy | (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present. | bool | `"true"` | no |
| description | A use-friendly description of the dataset | string | `"Log export dataset"` | no |
| labels | Dataset labels | map | `<map>` | no |
| location | The location of the storage bucket. | string | `"US"` | no |
| log\_sink\_writer\_identity | The service account that logging uses to write log entries to the destination. (This is available as an output coming from the root module). | string | n/a | yes |
| project\_id | The ID of the project in which the bigquery dataset will be created. | string | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| console\_link | The console link to the destination bigquery dataset |
| destination\_uri | The destination URI for the bigquery dataset. |
| project | The project in which the bigquery dataset was created. |
| resource\_id | The resource id for the destination bigquery dataset |
| resource\_name | The resource name for the destination bigquery dataset |
| self\_link | The self_link URI for the destination bigquery dataset |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<commit_msg>Regenerate docs<commit_after># Log Export: BigQuery destination submodule

This submodule allows you to configure a BigQuery dataset destination that
can be used by the log export created in the root module.

## Usage

The [examples](../../examples) directory contains directories for each destination, and within each destination directory are directories for each parent resource level. Consider the following
example that will configure a BigQuery dataset destination and a log export at the project level:

```hcl
module "log_export" {
  source                 = "terraform-google-modules/log-export/google"
  destination_uri        = "${module.destination.destination_uri}"
  filter                 = "severity >= ERROR"
  log_sink_name          = "bigquery_example_logsink"
  parent_resource_id     = "sample-project"
  parent_resource_type   = "project"
  unique_writer_identity = true
}

module "destination" {
  source                   = "terraform-google-modules/log-export/google//modules/bigquery"
  project_id               = "sample-project"
  dataset_name             = "sample_dataset"
  log_sink_writer_identity = "${module.log_export.writer_identity}"
}
```

At first glance that example seems like a circular dependency as each module declaration is
using an output from the other, however Terraform is able to collect and order all the resources
so that all dependencies are met.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| dataset\_name | The name of the bigquery dataset to be created and used for log entries matching the filter. | string | n/a | yes |
| default\_table\_expiration\_ms | Default table expiration time (in ms) | number | `"3600000"` | no |
| delete\_contents\_on\_destroy | (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present. | bool | `"true"` | no |
| description | A use-friendly description of the dataset | string | `"Log export dataset"` | no |
| labels | Dataset labels | map(string) | `<map>` | no |
| location | The location of the storage bucket. | string | `"US"` | no |
| log\_sink\_writer\_identity | The service account that logging uses to write log entries to the destination. (This is available as an output coming from the root module). | string | n/a | yes |
| project\_id | The ID of the project in which the bigquery dataset will be created. | string | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| console\_link | The console link to the destination bigquery dataset |
| destination\_uri | The destination URI for the bigquery dataset. |
| project | The project in which the bigquery dataset was created. |
| resource\_id | The resource id for the destination bigquery dataset |
| resource\_name | The resource name for the destination bigquery dataset |
| self\_link | The self_link URI for the destination bigquery dataset |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

{'fraction_non_alphanumeric': 0.10265544041450778, 'fraction_numerical': 0.0022668393782383418, 'mean_word_length': 3.4438848920863308, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4120619', 'n_tokens_mistral': 1626, 'n_tokens_neox': 1584, 'n_words': 685}