Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New resource: aws_transfer_workflow #21808

Closed
davidferguson-cr opened this issue Nov 17, 2021 · 2 comments · Fixed by #24248
Closed

New resource: aws_transfer_workflow #21808

davidferguson-cr opened this issue Nov 17, 2021 · 2 comments · Fixed by #24248
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/transfer Issues and PRs that pertain to the transfer service.
Milestone

Comments

@davidferguson-cr
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS released a new feature for AWS Transfer Family that adds support for managed workflows to make it easy to create, execute, and monitor post upload processing for file transfers over SFTP, FTPS, and FTP for Amazon S3 and Amazon EFS.

New or Affected Resource(s)

  • aws_transfer_workflow (new resource): creates a workflow with specified steps and step details that the workflow invokes after a file transfer completes.
  • aws_transfer_server (affected resource): requires new workflow_details argument to enable a workflow to be associated with a server. Only supports a single on_upload workflow detail currently which will contain the workflow ID for the workflow to be associated and an execution IAM role for the workflow to run as.
  • aws_transfer_workflow (new data source): data source to get the ID of an AWS Transfer Workflow for use in other resources.

Potential Terraform Configuration

Resources

resource "aws_transfer_server" "example" {
  endpoint_type = "PUBLIC"
  protocols     = ["SFTP"]
  domain        = "S3"

  workflow_details {
    on_upload = [
      {
        execution_role_arn = aws_iam_role.iam_for_transfer.arn
        workflow_id        = aws_transfer_workflow.example.id
      }
    ]
  }
}

resource "aws_transfer_workflow" "example" {
  description = "Example workflow description"

  steps = [
    {
      # Array of workflow steps as per
      # https://docs.aws.amazon.com/transfer/latest/userguide/API_WorkflowStep.html
    }
  ]

  on_exception_steps = [
    {
      # Array of workflow steps as per
      # https://docs.aws.amazon.com/transfer/latest/userguide/API_WorkflowStep.html
    }
  ]

  tags = {
    Name = "Example workflow"
  }
}

resource "aws_iam_role" "iam_for_transfer" {
  name = "iam_for_transfer"

  assume_role_policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "transfer.amazonaws.com"
      }
    }
  ]
}
EOF
}

# Note: aws_iam_policy and aws_iam_role_policy_attachment omitted for brevity

Data Source

data "aws_transfer_workflow" "example" {
  workflow_id = "w-12345678901234567"
}

Requires

References

@davidferguson-cr davidferguson-cr added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 17, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. service/transfer Issues and PRs that pertain to the transfer service. labels Nov 17, 2021
@davidferguson-cr davidferguson-cr changed the title Add support for Workflows in AWS Transfer Family New resource: aws_transfer_workflow Nov 17, 2021
@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed service/iam Issues and PRs that pertain to the iam service. needs-triage Waiting for first response or review from a maintainer. labels Nov 17, 2021
@github-actions github-actions bot added this to the v4.11.0 milestone Apr 15, 2022
@github-actions
Copy link

This functionality has been released in v4.11.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/transfer Issues and PRs that pertain to the transfer service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants