From fb2122271176f128d1d64e1a7030240c84822860 Mon Sep 17 00:00:00 2001 From: Rob Sterner Date: Thu, 19 Sep 2024 08:12:05 -0400 Subject: [PATCH] fix: added s3:ListBucket so ActiveStorage::PurgeJob can run --- tf/provider.tf | 3 ++- tf/terraform.tfstate | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tf/provider.tf b/tf/provider.tf index 66312a1f..bfa7751c 100644 --- a/tf/provider.tf +++ b/tf/provider.tf @@ -43,7 +43,8 @@ resource "aws_iam_policy" "staffplan_redux_bot_policy" { "Action": [ "s3:PutObject", "s3:GetObject", - "s3:DeleteObject" + "s3:DeleteObject", + "s3:ListBucket" ], "Resource": "${aws_s3_bucket.staffplan_redux_production.arn}/*" } diff --git a/tf/terraform.tfstate b/tf/terraform.tfstate index ef73b628..c10cfa00 100644 --- a/tf/terraform.tfstate +++ b/tf/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.5.7", - "serial": 35, + "serial": 37, "lineage": "6c680206-1f35-759f-49a7-8ad19bca3f72", "outputs": { "bucket_arn": { @@ -25,9 +25,9 @@ "name": "staffplan_redux_bot_policy", "name_prefix": "", "path": "/", - "policy": "{\"Statement\":[{\"Action\":[\"s3:PutObject\",\"s3:GetObject\",\"s3:DeleteObject\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::staffplan-redux-production/*\"}],\"Version\":\"2012-10-17\"}", + "policy": "{\"Statement\":[{\"Action\":[\"s3:PutObject\",\"s3:GetObject\",\"s3:DeleteObject\",\"s3:ListBucket\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::staffplan-redux-production/*\"}],\"Version\":\"2012-10-17\"}", "policy_id": "ANPA5KYKEGZV7WPZAGHQT", - "tags": null, + "tags": {}, "tags_all": {} }, "sensitive_attributes": [], @@ -47,11 +47,11 @@ { "schema_version": 0, "attributes": { - "groups": null, + "groups": [], "id": "s3_policy_attachment", "name": "s3_policy_attachment", "policy_arn": "arn:aws:iam::916459894379:policy/staffplan_redux_bot_policy", - "roles": null, + "roles": [], "users": [ "staffplan_redux_bot" ] @@ -111,13 +111,13 @@ "ipv6_addresses": [ "2600:1f18:62af:2400:52b7:7a0d:42d:c2c4" ], - "is_static_ip": false, + "is_static_ip": true, "key_pair_name": "staffplan-key-pair", "name": "staffplan-redux", "private_ip_address": "172.26.4.66", - "public_ip_address": "54.91.158.138", + "public_ip_address": "34.192.107.71", "ram_size": 2, - "tags": null, + "tags": {}, "tags_all": {}, "user_data": null, "username": "ubuntu"