27 lines
505 B
Terraform
27 lines
505 B
Terraform
|
resource "minio_iam_user" "vault" {
|
||
|
name = "vault_user"
|
||
|
}
|
||
|
|
||
|
resource "minio_s3_bucket" "vault" {
|
||
|
bucket = "vault"
|
||
|
acl = "private"
|
||
|
}
|
||
|
|
||
|
resource "minio_s3_bucket_policy" "vault" {
|
||
|
depends_on = [minio_s3_bucket.vault]
|
||
|
bucket = minio_s3_bucket.vault.bucket
|
||
|
policy = <<EOF
|
||
|
{
|
||
|
"Version": "2012-10-17",
|
||
|
"Statement": [
|
||
|
{
|
||
|
"Effect": "Allow",
|
||
|
"Principal": {"AWS": ["*"]},
|
||
|
"Resource": ["${minio_s3_bucket.vault.arn}"],
|
||
|
"Action": ["s3:ListBucket"]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
EOF
|
||
|
}
|