feat: allow the AWS deployment role to pass the backend and consumer task roles to ECS

This commit is contained in:
Matthew Meszaros
2026-10-22 12:14:15 +02:00
parent 8cd6e1e0fa
commit f31334bd7a
+4 -2
View File
@@ -67,8 +67,10 @@ data "aws_iam_policy_document" "github_deploy" {
}
}
statement {
actions = ["iam:PassRole"]
resources = [aws_iam_role.migration_execution.arn]
actions = ["iam:PassRole"]
resources = concat([aws_iam_role.migration_execution.arn], flatten([
for name in ["backend", "consumer"] : [aws_iam_role.execution[name].arn, aws_iam_role.application[name].arn]
]))
condition {
test = "StringEquals"
variable = "iam:PassedToService"