From 719981af109bc612247b07c52e398ea4db9ae6c3 Mon Sep 17 00:00:00 2001 From: Raj Poluri Date: Thu, 27 Feb 2025 15:17:19 -0600 Subject: [PATCH] create system glue database --- glue.tf | 7 +++++++ s3-other.tf | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/glue.tf b/glue.tf index f9892ef..31b5c4d 100644 --- a/glue.tf +++ b/glue.tf @@ -13,3 +13,10 @@ resource "aws_glue_catalog_database" "apiary_glue_database" { name = "${local.gluedb_prefix}${each.key}" description = "Managed by Apiary terraform" } + +resource "aws_glue_catalog_database" "apiary_glue_database" { + count = var.disable_glue_db_init ? 1 : 0 + location_uri = "s3://${aws_s3_bucket.apiary_system.id}/" + name = "${local.gluedb_prefix}${var.system_schema_name}" + description = "Managed by Apiary terraform" +} diff --git a/s3-other.tf b/s3-other.tf index fce8882..8d2c8a8 100644 --- a/s3-other.tf +++ b/s3-other.tf @@ -7,7 +7,7 @@ resource "aws_s3_bucket" "apiary_inventory_bucket" { count = var.s3_enable_inventory == true ? 1 : 0 bucket = local.s3_inventory_bucket - tags = merge(tomap({"Name"="${local.s3_inventory_bucket}"}), var.apiary_tags) + tags = merge(tomap({ "Name" = "${local.s3_inventory_bucket}" }), var.apiary_tags) policy = <