Skip to content

Commit

Permalink
Putting Describe BGD in different statement
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-j-smith committed Feb 23, 2024
1 parent a25021a commit af27d2e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ data "aws_iam_policy_document" "irsa" {
actions = [
"rds:CreateBlueGreenDeployment",
"rds:DeleteBlueGreenDeployment",
"rds:DescribeBlueGreenDeployments",
"rds:SwitchoverBlueGreenDeployment",
]

Expand All @@ -283,6 +282,17 @@ data "aws_iam_policy_document" "irsa" {
local.db_pg_arn
]
}
statement {
sid = "AllowDescribeBGDFor${random_id.id.hex}"
effect = "Allow"
actions = [
"rds:DescribeBlueGreenDeployments",
]

resources = [
"arn:aws:rds:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:deployment:*",
]
}
}

resource "aws_iam_policy" "irsa" {
Expand Down

0 comments on commit af27d2e

Please sign in to comment.