Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/s3-to-s3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion modules/datasync-task/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_datasync_tasks"></a> [datasync\_tasks](#input\_datasync\_tasks) | A list of task configurations | <pre>list(object({<br/> destination_location_arn = string<br/> source_location_arn = string<br/> cloudwatch_log_group_arn = optional(string)<br/> excludes = optional(object({ filter_type = string, value = string }))<br/> includes = optional(object({ filter_type = string, value = string }))<br/> name = optional(string)<br/> options = optional(map(string))<br/> schedule_expression = optional(string)<br/> tags = optional(map(string))<br/> }))</pre> | `[]` | no |
| <a name="input_datasync_tasks"></a> [datasync\_tasks](#input\_datasync\_tasks) | A list of task configurations | <pre>list(object({<br/> destination_location_arn = string<br/> source_location_arn = string<br/> cloudwatch_log_group_arn = optional(string)<br/> excludes = optional(object({ filter_type = string, value = string }))<br/> includes = optional(object({ filter_type = string, value = string }))<br/> name = optional(string)<br/> options = optional(map(string))<br/> schedule_expression = optional(string)<br/> tags = optional(map(string))<br/> task_mode = optional(string)<br/> }))</pre> | `[]` | no |

## Outputs

Expand Down
1 change: 1 addition & 0 deletions modules/datasync-task/main.tf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmalali-coder I can't see the check block that you mentioned adding to the module to make sure that object_tags aren't set to "PRESERVE" and verify_mode isn't set to "POINT_IN_TIME_CONSISTENT" when using enhanced mode.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed the commit with the object_tags. I am updating that now. verify_mode is in the variables.tf file.

Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions modules/datasync-task/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -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"
}

Loading