I'm trying to create a public s3 bucket, So objects can only be read-only by public and write access via keys. Below is my code. After bucket creation i can not access the objects via object url
我正在尝试创建一个公共S3存储桶,因此对象只能由公共只读,并通过键进行写访问。以下是我的代码。创建存储桶后,我无法通过对象URL访问对象
module "s3_public_bucket" {
source = "cloudposse/s3-bucket/aws"
version = "4.0.0"
name = local.public_bucket_name
acl = "public-read"
versioning_enabled = false
ignore_public_acls = false
block_public_acls = false
block_public_policy = false
sse_algorithm = "AES256"
allow_encrypted_uploads_only = true
allow_ssl_requests_only = true
cors_configuration = [
{
allowed_origins = ["*"] # Change this to your website/domain
allowed_methods = ["GET", "HEAD", ]
allowed_headers = ["*"]
expose_headers = []
max_age_seconds = "3000"
}
]
tags = {
Name = "${var.name}-${var.environment}-assets"
Environment = var.environment
Terraform = "Yes"
}
}
What I'm doing wrong here.
我在这里做错了什么。
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!