Skip to content

Commit

Permalink
fix: org account crawler table prefix (#14)
Browse files Browse the repository at this point in the history
Update the account tag extract crawler to use a more descriptive table
prefix.

Also enable the crawler schedules now that both have been tested.
  • Loading branch information
patheard authored Nov 8, 2024
1 parent 3d2e1db commit deda2ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions terragrunt/aws/glue/crawlers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ resource "aws_glue_security_configuration" "encryption_at_rest" {
#
resource "aws_glue_crawler" "operations_aws_production_cost_usage_report" {
name = "Cost and Usage Report 2.0"
description = "Classify the AWS Organization Cost and Usage Report data"
database_name = aws_glue_catalog_database.operations_aws_production.name
table_prefix = "cost_usage_report_"

Expand All @@ -44,17 +45,17 @@ resource "aws_glue_crawler" "operations_aws_production_cost_usage_report" {
Version = 1
})

# TODO: enable schedule once job has been tested
# schedule = "cron(00 7 1 * ? *)" # Create the new month's partition key
schedule = "cron(00 7 1 * ? *)" # Create the new month's partition key
}

#
# Organization Account Tags
#
resource "aws_glue_crawler" "operations_aws_production_account_tags" {
name = "Organization Account Tags"
description = "Classify the AWS Organization account tag extract"
database_name = aws_glue_catalog_database.operations_aws_production.name
table_prefix = "org_"
table_prefix = "account_tags_"

role = aws_iam_role.glue_crawler.arn
security_configuration = aws_glue_security_configuration.encryption_at_rest.name
Expand All @@ -74,6 +75,5 @@ resource "aws_glue_crawler" "operations_aws_production_account_tags" {
Version = 1
})

# TODO: enable schedule once job has been tested
# schedule = "cron(00 13 * * ? *)" # Pickup new accounts each day
schedule = "cron(00 13 * * ? *)" # Pickup new accounts each day
}

0 comments on commit deda2ff

Please sign in to comment.