Resource: aws_glue_catalog_database

Provides a Glue Catalog Database Resource. You can refer to the Glue Developer Guide for a full explanation of the Glue Data Catalog functionality

Example Usage

resource "aws_glue_catalog_database" "example" {
  name = "MyCatalogDatabase"
}

Create Table Default Permissions

resource "aws_glue_catalog_database" "example" {
  name = "MyCatalogDatabase"

  create_table_default_permission {
    permissions = ["SELECT"]

    principal {
      data_lake_principal_identifier = "IAM_ALLOWED_PRINCIPALS"
    }
  }
}

Argument Reference

This resource supports the following arguments:

federated_database

target_database

create_table_default_permission

principal

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Glue Catalog Databases using the catalog_id:name. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example:

import {
  to = aws_glue_catalog_database.database
  id = "123456789012:my_database"
}

Using terraform import, import Glue Catalog Databases using the catalog_id:name. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example:

% terraform import aws_glue_catalog_database.database 123456789012:my_database