google_biglake_database

Databases are containers of tables.

To get more information about Database, see:

Open in Cloud Shell

Example Usage - Biglake Database

resource "google_biglake_catalog" "catalog" {
    name = "my_catalog"
    location = "US"
}

resource "google_storage_bucket" "bucket" {
  name                        = "my_bucket"
  location                    = "US"
  force_destroy               = true
  uniform_bucket_level_access = true
}

resource "google_storage_bucket_object" "metadata_folder" {
  name    = "metadata/"
  content = " "
  bucket  = google_storage_bucket.bucket.name
}

resource "google_biglake_database" "database"  {
    name = "my_database"
    catalog = google_biglake_catalog.catalog.id
    type = "HIVE"
    hive_options {
        location_uri = "gs://${google_storage_bucket.bucket.name}/${google_storage_bucket_object.metadata_folder.name}"
        parameters = {
          "owner": "John Doe"
        }
    }
}

Argument Reference

The following arguments are supported:

The hive_options block supports:


Attributes Reference

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

Timeouts

This resource provides the following Timeouts configuration options:

Import

Database can be imported using any of these accepted formats:

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

import {
  id = "{{catalog}}/databases/{{name}}"
  to = google_biglake_database.default
}

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

$ terraform import google_biglake_database.default {{catalog}}/databases/{{name}}