diff --git a/modules/aws-s3-bucket/main.tf b/modules/aws-s3-bucket/main.tf index 688b468..c76f22a 100644 --- a/modules/aws-s3-bucket/main.tf +++ b/modules/aws-s3-bucket/main.tf @@ -23,6 +23,11 @@ resource "aws_s3_bucket" "main" { lifecycle { prevent_destroy = true } +} + +resource "aws_iam_user_policy" "main" { + name = "${var.bucket_name}-access" + user = "${aws_iam_user.main.name}" policy = <