File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 7
7
"github.com/ekristen/libnuke/pkg/registry"
8
8
"github.com/ekristen/libnuke/pkg/resource"
9
9
10
+ "fmt"
11
+
10
12
"github.com/aws/aws-sdk-go/service/backup"
11
13
)
12
14
@@ -107,19 +109,19 @@ func (b *BackupVaultAccessPolicy) Remove(_ context.Context) error {
107
109
//
108
110
// While deletion is Denied, you can update the policy with one that
109
111
// doesn't deny and then delete at will.
110
- allowDeletionPolicy := `{
111
- "Version": "2012-10-17",
112
- "Statement": [
113
- {
114
- "Effect": "Allow",
115
- "Principal": {
116
- "AWS": "arn:aws:iam::` + * b . accountID + ` :root"
117
- },
118
- "Action": "backup:DeleteBackupVaultAccessPolicy",
119
- "Resource": "*"
120
- }
121
- ]
122
- }`
112
+ allowDeletionPolicy := fmt . Sprintf ( `{
113
+ "Version": "2012-10-17",
114
+ "Statement": [
115
+ {
116
+ "Effect": "Allow",
117
+ "Principal": {
118
+ "AWS": "arn:aws:iam::%s :root"
119
+ },
120
+ "Action": "backup:DeleteBackupVaultAccessPolicy",
121
+ "Resource": "*"
122
+ }
123
+ ]
124
+ }` , * b . accountID )
123
125
// Ignore error from if we can't put permissive backup vault policy in for some reason, that's OK.
124
126
_ , _ = b .svc .PutBackupVaultAccessPolicy (& backup.PutBackupVaultAccessPolicyInput {
125
127
BackupVaultName : & b .backupVaultName ,
You can’t perform that action at this time.
0 commit comments