Untitled
unknown
plain_text
a year ago
633 B
7
Indexable
resource "aws_iam_policy" "s3_access_policy" {
name = "s3_access_policy"
description = "Policy to allow S3 access"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Action = ["s3:ListBucket"]
Resource = [
"arn:aws:s3:::${var.s3_bucket_name}"
]
},
{
Effect = "Allow"
Action = [
"s3:GetObject",
"s3:HeadObject",
"s3:GetObjectAttributes"
]
Resource = [
"arn:aws:s3:::${var.s3_bucket_name}/*"
]
}
]
})
}
Editor is loading...
Leave a Comment