mirror of
https://github.com/Sea-Haven-Industries/apm-wo-analysis.git
synced 2026-09-30 05:23:15 +00:00
Some checks are pending
Deploy / Deploy to prod (push) Waiting to run
* feat(infra): migrate pipeline and Grafana to HCP Terraform (PLAT-75) Move apm-wo-analysis into seahaven-prod under workspace apm-wo-analysis-prod with in-repo hcptf/githubdeploy IAM, stub Lambdas, and GitHub Actions zip CD. * chore(iam): add Checkov skip comments for HCP IAM documents Pre-push HIGH findings are the DLM snapshot describe, tagged EC2 creates, exec boundary DescribeLogGroups star, and the drop-uploader user policy.
43 lines
1.2 KiB
HCL
43 lines
1.2 KiB
HCL
resource "aws_glue_catalog_database" "analytics" {
|
|
name = local.glue_database
|
|
}
|
|
|
|
resource "aws_glue_catalog_table" "snapshots" {
|
|
name = local.glue_table
|
|
database_name = aws_glue_catalog_database.analytics.name
|
|
table_type = "EXTERNAL_TABLE"
|
|
|
|
parameters = {
|
|
classification = "parquet"
|
|
EXTERNAL = "TRUE"
|
|
"projection.enabled" = "true"
|
|
"projection.dt.type" = "date"
|
|
"projection.dt.format" = "yyyy-MM-dd"
|
|
"projection.dt.range" = "2026-01-01,NOW"
|
|
"storage.location.template" = "s3://${aws_s3_bucket.exports.bucket}/analytics/dt=$${dt}/"
|
|
}
|
|
|
|
partition_keys {
|
|
name = "dt"
|
|
type = "string"
|
|
}
|
|
|
|
storage_descriptor {
|
|
location = "s3://${aws_s3_bucket.exports.bucket}/analytics/"
|
|
input_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"
|
|
output_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"
|
|
|
|
ser_de_info {
|
|
serialization_library = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
|
|
}
|
|
|
|
dynamic "columns" {
|
|
for_each = local.snapshot_columns
|
|
|
|
content {
|
|
name = columns.value.name
|
|
type = columns.value.type
|
|
}
|
|
}
|
|
}
|
|
}
|