Describes a BigQuery linked dataset
To get more information about LinkedDataset, see:
resource "google_logging_project_bucket_config" "logging_linked_dataset" {
location = "global"
project = "my-project-name"
enable_analytics = true
bucket_id = "my-bucket"
}
resource "google_logging_linked_dataset" "logging_linked_dataset" {
link_id = "mylink"
bucket = google_logging_project_bucket_config.logging_linked_dataset.id
description = "Linked dataset test"
}
resource "google_logging_project_bucket_config" "logging_linked_dataset" {
location = "global"
project = "my-project-name"
enable_analytics = true
bucket_id = "my-bucket"
}
resource "google_logging_linked_dataset" "logging_linked_dataset" {
link_id = "mylink"
bucket = "my-bucket"
parent = "projects/my-project-name"
location = "global"
description = "Linked dataset test"
depends_on = ["google_logging_project_bucket_config.logging_linked_dataset"]
}
The following arguments are supported:
link_id
-
(Required)
The id of the linked dataset.
bucket
-
(Required)
The bucket to which the linked dataset is attached.
description
-
(Optional)
Describes this link. The maximum length of the description is 8000 characters.
parent
-
(Optional)
The parent of the linked dataset.
location
-
(Optional)
The location of the linked dataset.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{parent}}/locations/{{location}}/buckets/{{bucket}}/links/{{link_id}}
name
-
The resource name of the linked dataset. The name can have up to 100 characters. A valid link id
(at the end of the link name) must only have alphanumeric characters and underscores within it.
create_time
-
Output only. The creation timestamp of the link. A timestamp in RFC3339 UTC "Zulu" format,
with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z".
lifecycle_state
-
Output only. The linked dataset lifecycle state.
bigquery_dataset
-
The information of a BigQuery Dataset. When a link is created, a BigQuery dataset is created along
with it, in the same project as the LogBucket it's linked to. This dataset will also have BigQuery
Views corresponding to the LogViews in the bucket.
Structure is documented below.
The bigquery_dataset
block contains:
dataset_id
-
(Output)
Output only. The full resource name of the BigQuery dataset. The DATASET_ID will match the ID
of the link, so the link must match the naming restrictions of BigQuery datasets
(alphanumeric characters and underscores only). The dataset will have a resource path of
"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]"This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.LinkedDataset can be imported using any of these accepted formats:
{{parent}}/locations/{{location}}/buckets/{{bucket}}/links/{{link_id}}
In Terraform v1.5.0 and later, use an import
block to import LinkedDataset using one of the formats above. For example:
import {
id = "{{parent}}/locations/{{location}}/buckets/{{bucket}}/links/{{link_id}}"
to = google_logging_linked_dataset.default
}
When using the terraform import
command, LinkedDataset can be imported using one of the formats above. For example:
$ terraform import google_logging_linked_dataset.default {{parent}}/locations/{{location}}/buckets/{{bucket}}/links/{{link_id}}