mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: terraform changes already applied Reviewed By: a8m Differential Revision: D16752076 fbshipit-source-id: b3ccf1c827f6d918c6507f2978c3b497533ab725
39 lines
668 B
HCL
39 lines
668 B
HCL
resource "aws_s3_bucket" "website" {
|
|
bucket = local.domain_name
|
|
acl = "public-read"
|
|
|
|
server_side_encryption_configuration {
|
|
rule {
|
|
apply_server_side_encryption_by_default {
|
|
sse_algorithm = "AES256"
|
|
}
|
|
}
|
|
}
|
|
|
|
versioning {
|
|
enabled = true
|
|
}
|
|
}
|
|
|
|
data "aws_iam_policy_document" "website" {
|
|
statement {
|
|
actions = [
|
|
"s3:GetObject",
|
|
]
|
|
|
|
resources = [
|
|
"${aws_s3_bucket.website.arn}/*"
|
|
]
|
|
|
|
principals {
|
|
identifiers = ["*"]
|
|
type = "AWS"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "aws_s3_bucket_policy" "website" {
|
|
bucket = aws_s3_bucket.website.id
|
|
policy = data.aws_iam_policy_document.website.json
|
|
}
|