diff --git a/data-migration/locals.tf b/data-migration/locals.tf index 2c79fa5c..7133eedc 100644 --- a/data-migration/locals.tf +++ b/data-migration/locals.tf @@ -3,6 +3,6 @@ locals { policy_name = "${substr(var.destination_bucket_identifier, 0, 46)}-S3MigrationPolicy" bucket_list = flatten([for source in var.sources : [source.source_bucket_arn, "${source.source_bucket_arn}/*"] if source.source_bucket_arn != ""]) - worker_role_list = flatten([for source in var.sources : [source.worker_role_arn, "${source.worker_role_arn}/*"] if source.worker_role_arn != ""]) + worker_role_list = [for source in var.sources : source.worker_role_arn if source.worker_role_arn != ""] kms_key_list = [for source in var.sources : source.source_kms_key_arn if source.source_kms_key_arn != ""] } diff --git a/s3/variables.tf b/s3/variables.tf index 5860d0ca..5e835d6f 100644 --- a/s3/variables.tf +++ b/s3/variables.tf @@ -68,7 +68,7 @@ variable "config" { source_kms_key_arn = optional(string) worker_role_arn = string })), - import_sources = optional(map(object({ + import_sources = optional(list(object({ source_bucket_arn = string source_kms_key_arn = optional(string) worker_role_arn = string