module "s3_website_bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
bucket = "test.dev.net"
acl = "public-read"
control_object_ownership = true
object_ownership = "BucketOwnerPreferred"
force_destroy = false
block_public_acls = false
block_public_policy = false
ignore_public_acls = false
restrict_public_buckets = false
tags = var.tags[var.world]
website = {
index_document = "index.html"
error_document = "error.html"
}
# Allow public read access
attach_policy = true
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Sid = "PublicReadGetObject"
Effect = "Allow"
Principal = "*"
Action = "s3:GetObject"
Resource = "arn:aws:s3:::test.dev.net/*"
},
]
})
}
Timescale – the developer's data platform for modern apps, built on PostgreSQL
Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)