[英]Error after Creating S3 bucket with Terraform
I created an s3 bucket in terraform.我在 terraform 中创建了一个 s3 存储桶。 However after creating this bucket, I am getting the error: error getting S3 Bucket Object Lock configuration: AccessDenied: Access Denied但是在创建此存储桶后,我收到错误消息:错误获取 S3 存储桶 Object 锁定配置:AccessDenied: Access Denied
I am using AWS academy so I do not have many permissions, however, there is a role in AWS academy that allows the user to do stuff with s3.我使用的是 AWS 学院,所以我没有太多权限,但是,AWS 学院中有一个角色允许用户使用 s3 做事。 Is there a way to attach this IAM role to the S3 bucket so access it via Terraform?有没有办法将此 IAM 角色附加到 S3 存储桶,以便通过 Terraform 访问它?
I would like to upload images to this bucket, however I can no longer deploy code due to Terraform trying to access the Object Lock Configuration which it does not have access to.我想将图像上传到此存储桶,但是由于 Terraform 试图访问它无法访问的 Object 锁定配置,我无法再部署代码。 Is there a way to tell terraform to not try to not try to get this information?有没有办法告诉 terraform 不要尝试不要尝试获取此信息?
Here is my code这是我的代码
resource "aws_s3_bucket" "b" {
bucket = "my-tf-test-bucket"
acl = "private"
tags = {
Name = "My bucket"
Environment = "Dev"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.