Skip to content

Commit

Permalink
DDLS-356b readd the permissions to front container (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrwarren authored Oct 3, 2024
1 parent a8ee78e commit 4b9162e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions terraform/environment/region/ecs_iam_front.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,22 @@ resource "aws_iam_role_policy" "front_ssm" {
policy = data.aws_iam_policy_document.front_ssm.json
role = aws_iam_role.front.id
}

# ======= INVOKE API GATEWAY PERMISSIONS =====
resource "aws_iam_role_policy" "front_invoke_api_gateway" {
name = "front-api-gw.${local.environment}"
policy = data.aws_iam_policy_document.front_invoke_api_gateway.json
role = aws_iam_role.front.id
}

data "aws_iam_policy_document" "front_invoke_api_gateway" {
statement {
sid = "AllowInvokeOnDeputyReportingGateway"
effect = "Allow"
actions = [
"execute-api:Invoke",
"execute-api:ManageConnections"
]
resources = ["arn:aws:execute-api:eu-west-1:${var.account.sirius_api_account}:*"]
}
}

0 comments on commit 4b9162e

Please sign in to comment.