|
| 1 | +--- |
| 2 | +subcategory: "Cloud (Stackdriver) Logging" |
| 3 | +description: |- |
| 4 | + Get information about a Google Cloud Logging Sink. |
| 5 | +--- |
| 6 | + |
| 7 | +# google\_logging\_sink |
| 8 | + |
| 9 | +Use this data source to get a project, folder, organization or billing account logging sink details. |
| 10 | +To get more information about Service, see: |
| 11 | + |
| 12 | +[API documentation](https://cloud.google.com/logging/docs/reference/v2/rest/v2/sinks) |
| 13 | + |
| 14 | +## Example Usage - Retrieve Project Logging Sink Basic |
| 15 | + |
| 16 | + |
| 17 | +```hcl |
| 18 | +data google_logging_sink "project-sink" { |
| 19 | + id = "projects/0123456789/sinks/my-sink-name" |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +## Argument Reference |
| 24 | + |
| 25 | +The following arguments are supported: |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +- - - |
| 30 | + |
| 31 | +* `id` - (Required) The identifier for the resource. |
| 32 | + Examples: |
| 33 | + |
| 34 | + - `projects/[PROJECT_ID]/sinks/[SINK_NAME]` |
| 35 | + - `organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]` |
| 36 | + - `billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]` |
| 37 | + - `folders/[FOLDER_ID]/sinks/[SINK_NAME]` |
| 38 | + |
| 39 | + |
| 40 | +## Attributes Reference |
| 41 | + |
| 42 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 43 | + |
| 44 | + |
| 45 | +* `name` - The name of the logging sink. |
| 46 | + |
| 47 | +* `destination` - The destination of the sink (or, in other words, where logs are written to). |
| 48 | + |
| 49 | +* `filter` - The filter which is applied when exporting logs. Only log entries that match the filter are exported. |
| 50 | + |
| 51 | +* `description` - The description of this sink. |
| 52 | + |
| 53 | +* `disabled` - Whether this sink is disabled and it does not export any log entries. |
| 54 | + |
| 55 | +* `writer_identity` - The identity associated with this sink. This identity must be granted write access to the configured `destination`. |
| 56 | + |
| 57 | +* `bigquery_options` - Options that affect sinks exporting data to BigQuery. Structure is [documented below](#nested_bigquery_options). |
| 58 | + |
| 59 | +* `exclusions` - Log entries that match any of the exclusion filters are not exported. Structure is [documented below](#nested_exclusions). |
| 60 | + |
| 61 | +<a name="nested_bigquery_options"></a>The `bigquery_options` block supports: |
| 62 | + |
| 63 | +* `use_partitioned_tables` - Whether [BigQuery's partition tables](https://cloud.google.com/bigquery/docs/partitioned-tables) are used. |
| 64 | + |
| 65 | +<a name="nested_exclusions"></a>The `exclusions` block supports: |
| 66 | + |
| 67 | +* `name` - A client-assigned identifier, such as `load-balancer-exclusion`. |
| 68 | +* `description` - A description of this exclusion. |
| 69 | +* `filter` - An advanced logs filter that matches the log entries to be excluded. |
| 70 | +* `disabled` - Whether this exclusion is disabled and it does not exclude any log entries. |
0 commit comments