Skip to content

Commit

Permalink
Feat: Updated the main.tf for the workdlow details block to use optio…
Browse files Browse the repository at this point in the history
…nally.
  • Loading branch information
anmolnagpal committed Aug 25, 2023
1 parent 7adaffb commit c16c5f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,13 @@ resource "aws_transfer_server" "transfer_server" {
security_policy_name = var.security_policy_name
logging_role = join("", aws_iam_role.logging[*].arn)
tags = module.labels.tags
workflow_details {
on_upload {
execution_role = var.workflow_details.on_upload.execution_role
workflow_id = var.workflow_details.on_upload.workflow_id
dynamic "workflow_details" {
for_each = var.enable_workflow ? [1] : []
content {
on_upload {
execution_role = var.workflow_details.on_upload.execution_role
workflow_id = var.workflow_details.on_upload.workflow_id
}
}
}
dynamic "endpoint_details" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,9 @@ variable "workflow_details" {
})
})
description = "Workflow details for triggering the execution on file upload."
}

variable "enable_workflow" {
type = bool
default = false
}

0 comments on commit c16c5f9

Please sign in to comment.