gpt4 book ai didi

S3 Bucket Public-Read Only Using Terraform Cloudpose(使用Terraform Cloudpose的S3存储桶公共只读)

转载 作者:bug小助手 更新时间:2023-10-27 20:53:14 26 4
gpt4 key购买 nike



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.

我在这里做错了什么。


更多回答
优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com