We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59ef8b5 commit 63ca6e0Copy full SHA for 63ca6e0
1 file changed
env/production/aws-iam-policy-NextstrainArchiveUpload.tf
@@ -0,0 +1,33 @@
1
+resource "aws_iam_policy" "NextstrainArchiveUpload" {
2
+ name = "NextstrainArchiveUpload"
3
+ description = "Provides permissions to upload to the nextstrain-archive bucket"
4
+
5
+ policy = jsonencode({
6
+ "Version": "2012-10-17",
7
+ "Statement": [
8
+ {
9
+ "Sid": "ListBucket",
10
+ "Effect": "Allow",
11
+ "Action": "s3:ListBucket",
12
+ "Resource": "arn:aws:s3:::nextstrain-archive"
13
+ },
14
15
+ "Sid": "PutObjectIfAbsent",
16
17
+ "Action": "s3:PutObject",
18
+ "Resource": "arn:aws:s3:::nextstrain-archive/*",
19
+ "Condition": {
20
+ "Null": {
21
+ "s3:if-none-match": "false"
22
+ }
23
24
25
26
+ "Sid": "AbortMultipartUpload",
27
28
+ "Action": "s3:AbortMultipartUpload",
29
+ "Resource": "arn:aws:s3:::nextstrain-archive/*"
30
31
+ ]
32
+ })
33
+}
0 commit comments