hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.2k forks source link

Glue Data Catalog: support TargetDatabase and TargetTable #15296

Closed roberth-k closed 3 years ago

roberth-k commented 4 years ago

Community Note

Description

This is related to the overall implementation of Lake Formation (https://github.com/terraform-providers/terraform-provider-aws/issues/9700).

https://github.com/terraform-providers/terraform-provider-aws/issues/14411 must also be implemented in order for Glue databases to be shareable with Lake Formation.

The TargetDatabase and TargetTable properties of Glue Data Catalog databases and tables are used for setting up Resource Links, which is required to be able to surface cross-account shared tables in Athena and Redshift Spectrum.

It's possible there's also a specific TableType associated with this.

New or Affected Resource(s)

Potential Terraform Configuration

resource "aws_glue_catalog_database" "example" {
  name = "my-database"

  target_database {
    catalog_id    = "1234567890"
    database_name = "external-database"
  }
}

resource "aws_glue_catalog_table" "example" {
  name          = "my-table"
  database_name = aws_glue_catalog_database.example.name

  target_table {
    catalog_id    = "1234567890"
    database_name = "external-database"
    name          = "external-table"
  }
}

References

breathingdust commented 3 years ago

Closed via #19371 + #19372 and released in v3.41.0 of the provider 🎉

github-actions[bot] commented 3 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.