feat: add vault terraform user

This commit is contained in:
2023-04-09 23:24:34 +02:00
commit f48efb5ebd
9 changed files with 296 additions and 0 deletions

26
infrastructure/vault.tf Normal file
View File

@@ -0,0 +1,26 @@
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
}