generated from ministryofjustice/cloud-platform-terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
sqs.tf
35 lines (34 loc) · 835 Bytes
/
sqs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
data "aws_iam_policy_document" "sqs_for_github" {
statement {
sid = "AllowSQSListDescribe"
effect = "Allow"
actions = [
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ListDeadLetterSourceQueues",
"sqs:ListQueues",
"sqs:ListQueueTags"
]
resources = ["*"]
}
statement {
sid = "AllowSQSSendRecvOwn"
effect = "Allow"
actions = [
"sqs:CancelMessageMoveTask",
"sqs:ChangeMessageVisibility",
"sqs:DeleteMessage",
"sqs:ListMessageMoveTasks",
"sqs:ReceiveMessage",
"sqs:SendMessage",
"sqs:StartMessageMoveTask",
"sqs:PurgeQueue"
]
resources = ["*"]
condition {
test = "StringLike"
variable = "aws:PrincipalTag/GithubTeam"
values = ["*:$${aws:ResourceTag/GithubTeam}:*"]
}
}
}