diff --git a/internal/service/datasync/task_test.go b/internal/service/datasync/task_test.go index fc2e84cc7985..0f3e8f5a522a 100644 --- a/internal/service/datasync/task_test.go +++ b/internal/service/datasync/task_test.go @@ -652,6 +652,10 @@ func TestAccDataSyncTask_DefaultSyncOptions_verifyMode(t *testing.T) { }) } +func TestAccDataSyncTask_report_config(t *testing.T) { + +} + func TestAccDataSyncTask_tags(t *testing.T) { acctest.Skip(t, "Tagging on creation is inconsistent") var task1, task2, task3 datasync.DescribeTaskOutput @@ -978,6 +982,83 @@ resource "aws_datasync_task" "test" { `, rName, cron)) } +func testAccTaskReportConfig(rName string) string { + return acctest.ConfigCompose( + testAccTaskDestinationLocationS3BaseConfig(rName), + testAccTaskSourceLocationNFSBaseConfig(rName), + fmt.Sprintf(` +resource "aws_s3_bucket" "task_report_destination" { + bucket = "%[1]s-task-report-destination" + force_destroy = true +} + +resource "aws_s3_object "subdirectory" { + bucket = "%[1]s-task-report-destination" + key = "reports" + source = "/dev/null" +} + +resource "aws_iam_role" "destination_bucket_role" { + name = "%[1]s-destination-role" + + assume_role_policy = <