diff --git a/main.tf b/main.tf index c07f7ee..1d72a8e 100644 --- a/main.tf +++ b/main.tf @@ -125,7 +125,7 @@ data "aws_iam_policy_document" "this" { resource "aws_s3_bucket_policy" "policy" { bucket = aws_s3_bucket.this.bucket policy = data.aws_iam_policy_document.this.json - #depends_on = [null_resource.policy_delay] + depends_on = [null_resource.policy_delay] } resource "aws_s3_bucket_public_access_block" "this" { @@ -136,7 +136,7 @@ resource "aws_s3_bucket_public_access_block" "this" { restrict_public_buckets = true } -resource "null_resource" "s3_create_wait" { +resource "null_resource" "policy_delay" { triggers = { bucket = aws_s3_bucket.this.id }