diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-04 19:53:32 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-04 19:53:32 +0100 |
commit | 6207a285d717fc48ea73e0956ab10729eebb3329 (patch) | |
tree | adf0aba472bb5146ee2e26f375a7a8feb6674d9e /terraform/modules | |
parent | bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe (diff) | |
download | infra-6207a285d717fc48ea73e0956ab10729eebb3329.tar.gz infra-6207a285d717fc48ea73e0956ab10729eebb3329.tar.bz2 infra-6207a285d717fc48ea73e0956ab10729eebb3329.tar.xz infra-6207a285d717fc48ea73e0956ab10729eebb3329.zip |
Cleaning up terraform/
Diffstat (limited to 'terraform/modules')
-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 -} |