diff --git a/aws-iam-role-s3-readonly/main.tf b/aws-iam-role-s3-readonly/main.tf index 5922b3f9..8e182b64 100644 --- a/aws-iam-role-s3-readonly/main.tf +++ b/aws-iam-role-s3-readonly/main.tf @@ -52,7 +52,7 @@ data "aws_iam_policy_document" "s3-bucket-readonly" { actions = [ "s3:ListAllMyBuckets" ] - resources = toset(formatlist("arn:aws:s3:::%s", var.s3_bucket_names), formatlist("arn:aws:s3:::%s/*", var.s3_bucket_names)) + resources = toset(concat(formatlist("arn:aws:s3:::%s", var.s3_bucket_names), formatlist("arn:aws:s3:::%s/*", var.s3_bucket_names))) } }