clank-vault/infrastructure/vault.tf

27 lines
505 B
Terraform
Raw Normal View History

2023-04-09 23:24:34 +02:00
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
}