Hi,
Could anyone please assist me with the syntax of creating “AWS Transfer Family Workflow” with “COPY” step to transfer all the files from source AWS SFTP server bucket to some destination bucket. I am trying out with below code, but facing lot of configurational and syntax errors. Not able to find any relevant example of COPY step on terraform site also.
resource “aws_transfer_workflow” “copy_step_workflow” {
steps {
copy_step_details {
name = “copy_step_test”
source_file_location = aws_s3_bucket.sftp-bucket.id
destination_file_location = aws_s3_bucket.sftp-bucket-dest.id
}
type = “COPY”
}
}
Errors I am getting :
│ Error: Unsupported argument
│
│ on main.tf line 360, in resource “aws_transfer_workflow” “copy_step_workflow”:
│ 360: destination_file_location = aws_s3_bucket.sftp-bucket-dest.id
│
│ An argument named “destination_file_location” is not expected here. Did you
│ mean to define a block of type “destination_file_location”?
If I mention argument as"{{original_file}}" as per the terraform official documentation, I get below error :
Error: Reference to undeclared resource
│
│ on main.tf line 353, in resource "aws_transfer_workflow" "copy_step_workflow":
│ 353: source_file_location = "{original.file}"
│
│ A managed resource “original” “file” has not been declared in the root
│ module.
Not sure, what syntax and parameters I should write to simply create a “COPY” step form my source SFTP bucket to some other processing bucket.
I would really appreciate if someone can guide me with example code.