From f8ea902efc06273924323e949fd80e19f260ded1 Mon Sep 17 00:00:00 2001 From: ashle001 Date: Tue, 15 Sep 2020 08:25:12 -0400 Subject: [PATCH] attach bucket policy --- main.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.tf b/main.tf index 208cf7e..8e53c57 100644 --- a/main.tf +++ b/main.tf @@ -86,6 +86,14 @@ data "aws_iam_policy_document" "this" { } } +########## +# attach bucket policy +########## +resource "aws_s3_bucket_policy" "this" { + bucket = aws_s3_bucket.this.bucket + policy = data.aws_iam_policy_document.this.json +} + resource "null_resource" "s3_create_wait" { triggers = { bucket = aws_s3_bucket.this.id