Skip to content

Commit fb19d75

Browse files
[ndr-387] moved states permissions to common file
1 parent 144ced0 commit fb19d75

3 files changed

Lines changed: 12 additions & 18 deletions

File tree

base_iam/iam_github_dev_test.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ resource "aws_iam_policy" "github_actions_dev_test" {
4949
"ec2:DeleteNatGateway",
5050
"s3:*",
5151
"sqs:TagQueue",
52-
"states:CreateStateMachine",
53-
"states:DeleteStateMachine",
54-
"states:DescribeStateMachine",
55-
"states:TagResource",
56-
"states:UntagResource",
57-
"states:UpdateStateMachine"
5852
]
5953
Effect = "Allow"
6054
Resource = "*"

base_iam/iam_github_dev_test_pre-prod_prod.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,18 @@ resource "aws_iam_policy" "github_actions_dev_test_pre-prod_prod_3" {
424424
Effect = "Allow"
425425
Resource = "arn:aws:rum:eu-west-2:${data.aws_caller_identity.current.account_id}:appmonitor/*"
426426
},
427+
{
428+
Action = [
429+
"states:CreateStateMachine",
430+
"states:DeleteStateMachine",
431+
"states:DescribeStateMachine",
432+
"states:TagResource",
433+
"states:UntagResource",
434+
"states:UpdateStateMachine"
435+
]
436+
Effect = "Allow"
437+
Resource = "arn:aws:states:eu-west-2:${data.aws_caller_identity.current.account_id}:stateMachine:*"
438+
},
427439
]
428440
})
429441
}

base_iam/iam_github_pre-prod_prod.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ resource "aws_iam_policy" "github_actions_pre-prod_prod" {
5656
Effect = "Allow"
5757
Resource = "*"
5858
},
59-
{
60-
Action = [
61-
"states:CreateStateMachine",
62-
"states:DeleteStateMachine",
63-
"states:DescribeStateMachine",
64-
"states:TagResource",
65-
"states:UntagResource",
66-
"states:UpdateStateMachine"
67-
]
68-
Effect = "Allow"
69-
Resource = "arn:aws:states:eu-west-2:${data.aws_caller_identity.current.account_id}:stateMachine:*"
70-
},
7159
{
7260
Action = [
7361
"ecr:BatchDeleteImage",

0 commit comments

Comments
 (0)