google_data_catalog_entry

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:

Open in Cloud Shell

Example Usage - Data Catalog Entry Basic

resource "google_data_catalog_entry" "basic_entry" {
  entry_group = google_data_catalog_entry_group.entry_group.id
  entry_id = "my_entry"

  user_specified_type = "my_custom_type"
  user_specified_system = "SomethingExternal"
}

resource "google_data_catalog_entry_group" "entry_group" {
  entry_group_id = "my_group"
}
Open in Cloud Shell

Example Usage - Data Catalog Entry Fileset

resource "google_data_catalog_entry" "basic_entry" {
  entry_group = google_data_catalog_entry_group.entry_group.id
  entry_id = "my_entry"

  type = "FILESET"

  gcs_fileset_spec {
    file_patterns = ["gs://fake_bucket/dir/*"]
  }
}

resource "google_data_catalog_entry_group" "entry_group" {
  entry_group_id = "my_group"
}
Open in Cloud Shell

Example Usage - Data Catalog Entry Full

resource "google_data_catalog_entry" "basic_entry" {
  entry_group = google_data_catalog_entry_group.entry_group.id
  entry_id = "my_entry"

  user_specified_type = "my_user_specified_type"
  user_specified_system = "Something_custom"
  linked_resource = "my/linked/resource"

  display_name = "my custom type entry"
  description  = "a custom type entry for a user specified system"

  schema = <<EOF
{
  "columns": [
    {
      "column": "first_name",
      "description": "First name",
      "mode": "REQUIRED",
      "type": "STRING"
    },
    {
      "column": "last_name",
      "description": "Last name",
      "mode": "REQUIRED",
      "type": "STRING"
    },
    {
      "column": "address",
      "description": "Address",
      "mode": "REPEATED",
      "subcolumns": [
        {
          "column": "city",
          "description": "City",
          "mode": "NULLABLE",
          "type": "STRING"
        },
        {
          "column": "state",
          "description": "State",
          "mode": "NULLABLE",
          "type": "STRING"
        }
      ],
      "type": "RECORD"
    }
  ]
}
EOF
}

resource "google_data_catalog_entry_group" "entry_group" {
  entry_group_id = "my_group"
}

Argument Reference

The following arguments are supported:


The gcs_fileset_spec block supports:

The sample_gcs_file_specs block contains:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

The bigquery_table_spec block contains:

The view_spec block contains:

The table_spec block contains:

The bigquery_date_sharded_spec block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Entry can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Entry using one of the formats above. For example:

import {
  id = "{{name}}"
  to = google_data_catalog_entry.default
}

When using the terraform import command, Entry can be imported using one of the formats above. For example:

$ terraform import google_data_catalog_entry.default {{name}}

User Project Overrides

This resource supports User Project Overrides.