chmury_aronb/labs/terraform/glue.tf

17 lines
596 B
Terraform
Raw Normal View History

2024-05-11 13:02:56 +02:00
resource "aws_glue_catalog_database" "datalake_db_processed_zone" {
name = "datalake_processed_${var.account_number}_${var.student_initials}_${var.student_index_no}"
}
resource "aws_glue_crawler" "glue_crawler_raw_zone" {
database_name = aws_glue_catalog_database.datalake_db_raw_zone.name
name = "gc-raw-${var.account_number}-${var.student_initials}-${var.student_index_no}"
role = var.lab_role_arn
table_prefix = "crawler_"
s3_target {
path = "s3://${aws_s3_bucket.raw_bucket.bucket}/raw-zone/stockdata/"
}
tags = merge(local.common_tags, )
}