Skip to content

Commit

Permalink
Merge pull request #11 from psychic-spoon/patch-1
Browse files Browse the repository at this point in the history
DWX-17929: Update restricted-policy / reduced policy for start/stop EKS
  • Loading branch information
roohisyeda authored Apr 1, 2024
2 parents d3467d0 + 74ae652 commit 1dd233a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
19 changes: 18 additions & 1 deletion aws-iam-policies/docs/restricted-policy-doc-1.json5
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,23 @@
// Upgrade needs old/new instance status
],
"Resource": "*"
},
{
"Sid": "StartStopRDS",
"Effect": "Allow",
"Action": [
"rds:StartDBInstance",
// Stop RDS Instance while stopping the cluster
"rds:StopDBInstance",
// Start RDS Instance while starting the cluster
"rds:DescribeDBInstances"
// Describe RDBS (postgres) instance created by
// cf, used to detect quota of DB instance
],
"Resource": [
"arn:aws:rds:*:*:db:env-*-dwx-stack-rds",
"arn:aws:rds:*:*:subgrp:env-*-dwx-stack-dbsubnetgroup-*"
]
}
]
}
}
5 changes: 1 addition & 4 deletions aws-iam-policies/docs/restricted-policy-doc-2.json5
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@
"rds:CreateDBInstance",
// The RDBS (postgres) created to store dwx
// cluster info during activation
"rds:DescribeDBInstances",
// Describe RDBS (postgres) instance created by
// cf, used to detect quota of DB instance
"rds:CreateDBSubnetGroup",
// The DBSubnetGroup created during activation
"rds:DescribeDBSubnetGroups",
Expand Down Expand Up @@ -256,4 +253,4 @@
}
}
]
}
}
13 changes: 13 additions & 0 deletions aws-iam-policies/reduced-permissions-mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,19 @@
"s3:PutObjectAcl"
],
"Resource": "*"
},
{
"Sid": "StartStopRDS",
"Effect": "Allow",
"Action": [
"rds:StartDBInstance",
"rds:StopDBInstance",
"rds:DescribeDBInstances"
],
"Resource": [
"arn:aws:rds:*:*:db:env-*-dwx-stack-rds",
"arn:aws:rds:*:*:subgrp:env-*-dwx-stack-dbsubnetgroup-*"
]
}
]
}

0 comments on commit 1dd233a

Please sign in to comment.