diff options
Diffstat (limited to 'terraform/modules/minio-pg-backup')
-rw-r--r-- | terraform/modules/minio-pg-backup/main.tf | 63 | ||||
-rw-r--r-- | terraform/modules/minio-pg-backup/vars.tf | 3 |
2 files changed, 0 insertions, 66 deletions
diff --git a/terraform/modules/minio-pg-backup/main.tf b/terraform/modules/minio-pg-backup/main.tf deleted file mode 100644 index f9e774a..0000000 --- a/terraform/modules/minio-pg-backup/main.tf +++ /dev/null @@ -1,63 +0,0 @@ -terraform { - required_providers { - minio = { - source = "tidalf/minio" - version = "1.1.1" - } - } -} - -resource "minio_iam_user" "sender" { - name = "pg-backup-${var.id}-sender" -# update_secret = true -} - -resource "minio_s3_bucket" "bucket" { - bucket = "pg-backup-${var.id}" - acl = "public" -} - -resource "minio_iam_policy" "sender" { - name = minio_iam_user.sender.id - policy= <<EOF -{ - "Version":"2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "s3:ListBucket" - ], - "Resource": "arn:aws:s3:::${minio_s3_bucket.bucket.bucket}" - }, - { - "Effect": "Allow", - "Action": [ - "s3:ListBucket", - "s3:GetObject", - "s3:PutObject" - ], - "Resource": "arn:aws:s3:::${minio_s3_bucket.bucket.bucket}/*" - } - ] -} -EOF -} - -resource "minio_iam_user_policy_attachment" "sender" { - user_name = minio_iam_user.sender.id - policy_name = minio_iam_policy.sender.id -} - -output "sender" { - value = { - access_key: minio_iam_user.sender.name, - secret_key: minio_iam_user.sender.secret, - } -} - -output "bucket" { - value = { - name: minio_s3_bucket.bucket.id, - } -} diff --git a/terraform/modules/minio-pg-backup/vars.tf b/terraform/modules/minio-pg-backup/vars.tf deleted file mode 100644 index f1f47fe..0000000 --- a/terraform/modules/minio-pg-backup/vars.tf +++ /dev/null @@ -1,3 +0,0 @@ -variable "id" { - type = string -} |