Skip to content

Commit

Permalink
Make aws s3 cp --quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Oct 10, 2024
1 parent 09aed26 commit fcc420d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/postgres-etl/extract/extract_task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "extract_task" {
# N.B. $DUMP_FILENAME is injected by the Step Function task
override_command = [
"sh", "-c",
"apk upgrade && pg_dump -d $DB_CONNECTION_URL --no-acl --no-owner | gzip > $MOUNT_POINT/$DUMP_FILENAME.sql.gz && aws s3 cp $MOUNT_POINT/$DUMP_FILENAME.sql.gz s3://${var.s3_extract_bucket_name}-${var.environment_name}/$DUMP_FILENAME-$(date +%Y-%m-%d-%H-%M-%S).sql.gz"
"apk upgrade && pg_dump -d $DB_CONNECTION_URL --no-acl --no-owner | gzip > $MOUNT_POINT/$DUMP_FILENAME.sql.gz && aws s3 cp --quiet $MOUNT_POINT/$DUMP_FILENAME.sql.gz s3://${var.s3_extract_bucket_name}-${var.environment_name}/$DUMP_FILENAME-$(date +%Y-%m-%d-%H-%M-%S).sql.gz && echo \"$DUMP_FILENAME successfully uploaded to S3\""
]
port = null
# ECS Execution role will need access to these
Expand Down
2 changes: 1 addition & 1 deletion modules/postgres-etl/load/load_task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module "load_task" {
# N.B. $DUMP_FILENAME is injected by the Step Function task
override_command = [
"sh", "-c",
"aws s3 cp s3://${var.s3_load_bucket_name}-${var.environment_name}/$LOAD_FILENAME /mnt/efs0/etl-load.sql.gz && gunzip /mnt/efs0/etl-load.sql.gz && pg_restore --clean --if-exists -d $DB_CONNECTION_URL -j ${var.load_task_pgrestore_workers} --no-acl --no-owner /mnt/efs0/etl-load.sql"
"aws s3 cp --quiet s3://${var.s3_load_bucket_name}-${var.environment_name}/$LOAD_FILENAME /mnt/efs0/etl-load.sql.gz && echo \"$LOAD_FILENAME successfully downloaded from S3\" && gunzip /mnt/efs0/etl-load.sql.gz && pg_restore --clean --if-exists -d $DB_CONNECTION_URL -j ${var.load_task_pgrestore_workers} --no-acl --no-owner /mnt/efs0/etl-load.sql"
]
port = null
secret_environment_variables = [
Expand Down

0 comments on commit fcc420d

Please sign in to comment.