Skip to content

Resource: awsTransferWorkflow

Provides a AWS Transfer Workflow resource.

Example Usage

Basic single step example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.transferWorkflow.TransferWorkflow(this, "example", {
  steps: [
    {
      deleteStepDetails: {
        name: "example",
        sourceFileLocation: "${original.file}",
      },
      type: "DELETE",
    },
  ],
});

Multistep example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.transferWorkflow.TransferWorkflow(this, "example", {
  steps: [
    {
      customStepDetails: {
        name: "example",
        sourceFileLocation: "${original.file}",
        target: "${aws_lambda_function.example.arn}",
        timeoutSeconds: 60,
      },
      type: "CUSTOM",
    },
    {
      tagStepDetails: {
        name: "example",
        sourceFileLocation: "${original.file}",
        tags: [
          {
            key: "Name",
            value: "Hello World",
          },
        ],
      },
      type: "TAG",
    },
  ],
});

Argument Reference

The following arguments are supported:

  • description - (Optional) A textual description for the workflow.
  • onExceptionSteps - (Optional) Specifies the steps (actions) to take if errors are encountered during execution of the workflow. See Workflow Steps below.
  • steps - (Required) Specifies the details for the steps that are in the specified workflow. See Workflow Steps below.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Workflow Steps

  • copyStepDetails - (Optional) Details for a step that performs a file copy. See Copy Step Details below.
  • customStepDetails - (Optional) Details for a step that invokes a lambda function.
  • decryptStepDetails - (Optional) Details for a step that decrypts the file.
  • deleteStepDetails - (Optional) Details for a step that deletes the file.
  • tagStepDetails - (Optional) Details for a step that creates one or more tags.
  • type - (Required) One of the following step types are supported. copy, custom, decrypt, delete, and tag.

Copy Step Details

  • destinationFileLocation - (Optional) Specifies the location for the file being copied. Use ${Transfer:username} in this field to parametrize the destination prefix by username.
  • name - (Optional) The name of the step, used as an identifier.
  • overwriteExisting - (Optional) A flag that indicates whether or not to overwrite an existing file of the same name. The default is false. Valid values are true and false.
  • sourceFileLocation - (Optional) Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step.

Custom Step Details

  • name - (Optional) The name of the step, used as an identifier.
  • sourceFileLocation - (Optional) Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step.
  • target - (Optional) The ARN for the lambda function that is being called.
  • timeoutSeconds - (Optional) Timeout, in seconds, for the step.

Decrypt Step Details

  • destinationFileLocation - (Optional) Specifies the location for the file being copied. Use ${Transfer:username} in this field to parametrize the destination prefix by username.
  • name - (Optional) The name of the step, used as an identifier.
  • overwriteExisting - (Optional) A flag that indicates whether or not to overwrite an existing file of the same name. The default is false. Valid values are true and false.
  • sourceFileLocation - (Optional) Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step.
  • type - (Required) The type of encryption used. Currently, this value must be "pgp".

Delete Step Details

  • name - (Optional) The name of the step, used as an identifier.
  • sourceFileLocation - (Optional) Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step.

Tag Step Details

  • name - (Optional) The name of the step, used as an identifier.
  • sourceFileLocation - (Optional) Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow. Enter ${previous.file} to use the previous file as the input. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value. Enter ${original.file} to use the originally-uploaded file location as input for this step.
  • tags - (Optional) Array that contains from 1 to 10 key/value pairs. See S3 Tags below.
Destination File Location
  • efsFileLocation - (Optional) Specifies the details for the EFS file being copied.
  • s3FileLocation - (Optional) Specifies the details for the S3 file being copied.
EFS File Location
  • fileSystemId - (Optional) The ID of the file system, assigned by Amazon EFS.
  • path - (Optional) The pathname for the folder being used by a workflow.
S3 File Location
  • bucket - (Optional) Specifies the S3 bucket for the customer input file.
  • key - (Optional) The name assigned to the file when it was created in S3. You use the object key to retrieve the object.
S3 Tag
  • key - (Required) The name assigned to the tag that you create.
  • value - (Required) The value that corresponds to the key.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - The Workflow ARN.
  • id - The Workflow id.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Transfer Workflows can be imported using the worflowId.

$ terraform import aws_transfer_workflow.example example