Google Data catalog Entry
This page shows how to write Terraform for Data catalog Entry and write them securely.
google_data_catalog_entry (Terraform)
The Entry in Data catalog can be configured in Terraform with the resource name google_data_catalog_entry
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_data_catalog_entry" "bar_entry" {
entry_group = google_data_catalog_entry_group.entry_group.id
entry_id = "Source.Bar"
user_specified_type = "Bar"
user_specified_system = "Source"
resource "google_data_catalog_entry" "this" {
description = var.description
display_name = var.display_name
entry_group = var.entry_group
entry_id = var.entry_id
linked_resource = var.linked_resource
Parameters
-
bigquery_date_sharded_spec
optional computed - list of object
Specification for a group of BigQuery tables with name pattern [prefix]YYYYMMDD. Context: https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
-
dataset
- string -
shard_count
- number -
table_prefix
- string -
bigquery_table_spec
optional computed - list of object
Specification that applies to a BigQuery table. This is only valid on entries of type TABLE.
-
table_source_type
- string -
table_spec
- list of object-
grouped_entry
- string
-
-
view_spec
- list of object-
view_query
- string
-
-
description
optional - string
Entry description, which can consist of several sentences or paragraphs that describe entry contents.
-
display_name
optional - string
Display information such as title and description. A short name to identify the entry, for example, "Analytics Data - Jan 2011".
-
entry_group
required - string
The name of the entry group this entry is in.
-
entry_id
required - string
The id of the entry to create.
-
id
optional computed - string -
integrated_system
optional computed - string
This field indicates the entry's source system that Data Catalog integrates with, such as BigQuery or Pub/Sub.
-
linked_resource
optional computed - string
The resource this metadata entry refers to. For Google Cloud Platform resources, linkedResource is the full name of the resource. For example, the linkedResource for a table resource from BigQuery is: //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId Output only when Entry is of type in the EntryType enum. For entries with userSpecifiedType, this field is optional and defaults to an empty string.
-
name
optional computed - string
The Data Catalog resource name of the entry in URL format. Example: projects/[project_id]/locations/[location]/entryGroups/[entryGroupId]/entries/[entryId]. Note that this Entry and its child resources may not actually be stored in the location in this name.
-
schema
optional - string
Schema of the entry (e.g. BigQuery, GoogleSQL, Avro schema), as a json string. An entry might not have any schema attached to it. See https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries#schema for what fields this schema can contain.
-
type
optional - string
The type of the entry. Only used for Entries with types in the EntryType enum. Currently, only FILESET enum value is allowed. All other entries created through Data Catalog must use userSpecifiedType. Possible values: ["FILESET"]
-
user_specified_system
optional - string
This field indicates the entry's source system that Data Catalog does not integrate with. userSpecifiedSystem strings must begin with a letter or underscore and can only contain letters, numbers, and underscores; are case insensitive; must be at least 1 character and at most 64 characters long.
-
user_specified_type
optional - string
Entry type if it does not fit any of the input-allowed values listed in EntryType enum above. When creating an entry, users should check the enum values first, if nothing matches the entry to be created, then provide a custom value, for example "my_special_type". userSpecifiedType strings must begin with a letter or underscore and can only contain letters, numbers, and underscores; are case insensitive; must be at least 1 character and at most 64 characters long.
-
gcs_fileset_spec
list block-
file_patterns
required - list of string
Patterns to identify a set of files in Google Cloud Storage. See Cloud Storage documentation for more information. Note that bucket wildcards are currently not supported. Examples of valid filePatterns: gs://bucket_name/dir/: matches all files within bucketname/dir directory. gs://bucketname/dir/**: matches all files in bucket_name/dir spanning all subdirectories. gs://bucketname/file: matches files prefixed by file in bucket_name gs://bucket_name/??.txt: matches files with two characters followed by .txt in bucket_name gs://bucketname/[aeiou].txt: matches files that contain a single vowel character followed by .txt in bucket_name gs://bucketname/[a-m].txt: matches files that contain a, b, ... or m followed by .txt in bucket_name gs://bucketname/a//b: matches all files in bucketname that match a//b pattern, such as a/c/b, a/d/b _ gs://another_bucket/a.txt: matches gs://another_bucket/a.txt
-
sample_gcs_file_specs
optional computed - list of object
Sample files contained in this fileset, not all files contained in this fileset are represented here.
-
file_path
- string -
size_bytes
- number
-
-
timeouts
single block
Explanation in Terraform Registry
Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of Google Cloud Platform. Clients can use the linkedResource field in the Entry resource to refer to the original resource ID of the source system. An Entry resource contains resource details, such as its schema. An Entry can also be used to attach flexible metadata, such as a Tag. To get more information about Entry, see:
- API documentation
- How-to Guides
Frequently asked questions
What is Google Data catalog Entry?
Google Data catalog Entry is a resource for Data catalog of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Data catalog Entry?
For Terraform, the anz-bank/sysl and niveklabs/google source code examples are useful. See the Terraform Example section for further details.