Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Byuc 1985 root folder s3 access #233

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions data-egress.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1380,13 +1380,34 @@ resource "aws_dynamodb_table_item" "ap_ml_preprocessed_data" {

item = <<ITEM
{
"source_prefix": {"S": "preprocessed_csv/journal/$TODAYS_DATE/*"},
"source_prefix": {"S": "ap_ml/journal/preprocessed_data/$TODAYS_DATE/*"},
"pipeline_name": {"S": "ap_preproc_journal"},
"recipient_name": {"S": "ap_preproc_journal"},
"transfer_type": {"S": "S3"},
"source_bucket": {"S": "${data.terraform_remote_state.common.outputs.published_bucket.id}"},
"destination_bucket": {"S": "${data.terraform_remote_state.common.outputs.dataworks_model_published_bucket.id}"},
"destination_prefix": {"S": "/preprocessed/journal/$TODAYS_DATE/"},
"destination_prefix": {"S": "ap_ml/journal/preprocessed_data/$TODAYS_DATE/"},
"decrypt": {"bool": true},
"rewrap_datakey": {"bool": false},
"encrypting_key_ssm_parm_name": {"S": ""}
}
ITEM
}

resource "aws_dynamodb_table_item" "ap_ml_preprocessed_training_data" {
table_name = aws_dynamodb_table.data_egress.name
hash_key = aws_dynamodb_table.data_egress.hash_key
range_key = aws_dynamodb_table.data_egress.range_key

item = <<ITEM
{
"source_prefix": {"S": "ap_ml/journal/preprocessed_training_data/$TODAYS_DATE/*"},
"pipeline_name": {"S": "ap_preproc_journal"},
"recipient_name": {"S": "ap_preproc_journal_training"},
"transfer_type": {"S": "S3"},
"source_bucket": {"S": "${data.terraform_remote_state.common.outputs.published_bucket.id}"},
"destination_bucket": {"S": "${data.terraform_remote_state.common.outputs.dataworks_model_published_bucket.id}"},
"destination_prefix": {"S": "ap_ml/journal/preprocessed_training_data/$TODAYS_DATE/"},
"decrypt": {"bool": true},
"rewrap_datakey": {"bool": false},
"encrypting_key_ssm_parm_name": {"S": ""}
Expand Down
2 changes: 1 addition & 1 deletion data-egress_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ data "aws_iam_policy_document" "data_egress_server_task" {
"${data.terraform_remote_state.common.outputs.published_bucket.arn}/dataegress/best-start/*",
"${data.terraform_remote_state.common.outputs.published_bucket.arn}/dataegress/ers/*",
"${data.terraform_remote_state.common.outputs.published_bucket.arn}/dataegress/RIS_DSP_Manual/*",
"${data.terraform_remote_state.common.outputs.published_bucket.arn}/preprocessed_csv/*"
"${data.terraform_remote_state.common.outputs.published_bucket.arn}/ap_ml/*"
]
}

Expand Down