Skip to content

Commit

Permalink
recreate liberator_db_snapshot_to_s3 module
Browse files Browse the repository at this point in the history
add bucket creation back to db-snapshot-to-s3 module
remove associated bucket from core
  • Loading branch information
timburke-hackit committed Nov 9, 2023
1 parent 25c53ef commit 8805f6e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 21 deletions.
42 changes: 21 additions & 21 deletions terraform/core/10-aws-s3-buckets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -447,24 +447,24 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "rds_export_storag
}
}

module "deprecated_rds_export_storage" {
source = "../modules/s3-bucket"

tags = module.tags.values
project = var.project
environment = var.environment
identifier_prefix = "${local.identifier_prefix}-dp"
bucket_name = "RDS Export Storage"
bucket_identifier = "rds-export-storage"
}

resource "aws_s3_bucket_server_side_encryption_configuration" "deprecated_rds_export_storage_encryption" {
bucket = module.deprecated_rds_export_storage.bucket_id

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
}
bucket_key_enabled = true
}
}
#module "deprecated_rds_export_storage" {
# source = "../modules/s3-bucket"
#
# tags = module.tags.values
# project = var.project
# environment = var.environment
# identifier_prefix = "${local.identifier_prefix}-dp"
# bucket_name = "RDS Export Storage"
# bucket_identifier = "rds-export-storage"
#}

#resource "aws_s3_bucket_server_side_encryption_configuration" "deprecated_rds_export_storage_encryption" {
# bucket = module.deprecated_rds_export_storage.bucket_id
#
# rule {
# apply_server_side_encryption_by_default {
# sse_algorithm = "aws:kms"
# }
# bucket_key_enabled = true
# }
#}
23 changes: 23 additions & 0 deletions terraform/core/36-liberator-import.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ module "liberator_dump_to_rds_snapshot" {
vpc_id = data.aws_vpc.network.id
}

module "liberator_db_snapshot_to_s3" {
count = 1
source = "../modules/db-snapshot-to-s3"
tags = module.tags.values
project = var.project
environment = var.environment
identifier_prefix = "${local.identifier_prefix}-dp"
lambda_artefact_storage_bucket = module.lambda_artefact_storage.bucket_id
zone_kms_key_arn = module.landing_zone.kms_key_arn
zone_bucket_arn = module.landing_zone.bucket_arn
zone_bucket_id = module.landing_zone.bucket_id
rds_export_storage_bucket_arn = module.rds_export_storage.bucket_arn
rds_export_storage_bucket_id = module.rds_export_storage.bucket_id
rds_export_storage_kms_key_arn = module.rds_export_storage.kms_key_arn
rds_export_storage_kms_key_id = module.rds_export_storage.kms_key_id
service_area = "parking"
rds_instance_ids = [for item in module.liberator_dump_to_rds_snapshot : item.rds_instance_id]
workflow_name = aws_glue_workflow.parking_liberator_data.name
workflow_arn = aws_glue_workflow.parking_liberator_data.arn
backdated_workflow_name = aws_glue_workflow.parking_liberator_backdated_data.name
backdated_workflow_arn = aws_glue_workflow.parking_liberator_backdated_data.arn
}

resource "aws_glue_workflow" "parking_liberator_data" {
# Components for this workflow are managed mainly in etl/38-aws-glue-job-parking.tf by parking officers
# There are couple of other resources that are part of the ingestion process, but the core ETL configuration is in the file mentioned above
Expand Down

0 comments on commit 8805f6e

Please sign in to comment.