diff --git a/examples/s3-to-s3-cross-account/main.tf b/examples/s3-to-s3-cross-account/main.tf index fb16c40..93a15ae 100644 --- a/examples/s3-to-s3-cross-account/main.tf +++ b/examples/s3-to-s3-cross-account/main.tf @@ -205,6 +205,7 @@ module "backup_tasks" { name = "s3_to_s3_cross_account_task" source_location_arn = module.s3_source_location.s3_locations["source-bucket"].arn destination_location_arn = module.s3_dest_location.s3_locations["dest-bucket"].arn + task_mode = "ENHANCED" # Use enhanced mode for S3-to-S3 cross-account transfers options = { posix_permissions = "NONE" uid = "NONE" diff --git a/examples/s3-to-s3/main.tf b/examples/s3-to-s3/main.tf index b42ccb4..88a4ee9 100644 --- a/examples/s3-to-s3/main.tf +++ b/examples/s3-to-s3/main.tf @@ -44,6 +44,7 @@ module "backup_tasks" { name = "s3-to-s3-backup" source_location_arn = module.s3_location.s3_locations["source-bucket"].arn destination_location_arn = module.s3_location.s3_locations["dest-bucket"].arn + task_mode = "ENHANCED" # Use enhanced mode for S3-to-S3 transfers options = { posix_permissions = "NONE" uid = "NONE" diff --git a/modules/datasync-task/README.md b/modules/datasync-task/README.md index fa86b61..dbb662a 100644 --- a/modules/datasync-task/README.md +++ b/modules/datasync-task/README.md @@ -70,7 +70,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [datasync\_tasks](#input\_datasync\_tasks) | A list of task configurations |
list(object({
destination_location_arn = string
source_location_arn = string
cloudwatch_log_group_arn = optional(string)
excludes = optional(object({ filter_type = string, value = string }))
includes = optional(object({ filter_type = string, value = string }))
name = optional(string)
options = optional(map(string))
schedule_expression = optional(string)
tags = optional(map(string))
})) | `[]` | no |
+| [datasync\_tasks](#input\_datasync\_tasks) | A list of task configurations | list(object({
destination_location_arn = string
source_location_arn = string
cloudwatch_log_group_arn = optional(string)
excludes = optional(object({ filter_type = string, value = string }))
includes = optional(object({ filter_type = string, value = string }))
name = optional(string)
options = optional(map(string))
schedule_expression = optional(string)
tags = optional(map(string))
task_mode = optional(string)
})) | `[]` | no |
## Outputs
diff --git a/modules/datasync-task/main.tf b/modules/datasync-task/main.tf
index 6a3873c..980bbc2 100644
--- a/modules/datasync-task/main.tf
+++ b/modules/datasync-task/main.tf
@@ -7,6 +7,7 @@ resource "aws_datasync_task" "datasync_tasks" {
destination_location_arn = each.value.destination_location_arn
source_location_arn = each.value.source_location_arn
cloudwatch_log_group_arn = try(each.value.cloudwatch_log_group_arn, null)
+ task_mode = try(each.value.task_mode, null)
excludes {
filter_type = try(each.value.excludes.filter_type, null)
diff --git a/modules/datasync-task/variables.tf b/modules/datasync-task/variables.tf
index 2ad7503..1978701 100644
--- a/modules/datasync-task/variables.tf
+++ b/modules/datasync-task/variables.tf
@@ -9,6 +9,7 @@ variable "datasync_tasks" {
options = optional(map(string))
schedule_expression = optional(string)
tags = optional(map(string))
+ task_mode = optional(string)
}))
default = []
description = "A list of task configurations"
diff --git a/outputs.tf b/outputs.tf
index f71a918..d641521 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -1,15 +1,15 @@
output "s3_locations" {
- value = aws_datasync_location_s3.s3_location
+ value = aws_datasync_location_s3.s3_location
description = "DataSync S3 Location ARN"
}
output "efs_locations" {
- value = aws_datasync_location_efs.efs_location
+ value = aws_datasync_location_efs.efs_location
description = "DataSync EFS Location ARN"
}
output "datasync_role_arn" {
- value = { for k, role in aws_iam_role.datasync_role_s3 : k => role.arn }
+ value = { for k, role in aws_iam_role.datasync_role_s3 : k => role.arn }
description = "DataSync Task ARN"
}