Skip to content

Commit

Permalink
Use aws_s3_bucket_policy resource (#27)
Browse files Browse the repository at this point in the history
Instead of using the deprecated "policy" argument for the
aws_s3_bucket.  Looks like this might be the last deprecation warning!
  • Loading branch information
legoscia authored Mar 19, 2024
1 parent f7294f5 commit 8428ecf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion site-main/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ data "template_file" "bucket_policy" {

resource "aws_s3_bucket" "website_bucket" {
bucket = var.bucket_name
policy = data.template_file.bucket_policy.rendered
force_destroy = var.force_destroy

tags = local.tags
}

resource "aws_s3_bucket_policy" "website_bucket" {
bucket = aws_s3_bucket.website_bucket.id
policy = data.template_file.bucket_policy.rendered
}

resource "aws_s3_bucket_website_configuration" "website_bucket" {
bucket = aws_s3_bucket.website_bucket.id

Expand Down

0 comments on commit 8428ecf

Please sign in to comment.