mirror of
https://github.com/livekit/livekit.git
synced 2026-04-01 10:55:45 +00:00
27 lines
565 B
HCL
27 lines
565 B
HCL
|
|
// role for ECS execution
|
|
resource "aws_iam_role" "ecs_role" {
|
|
name = "livekit-${var.name}-execution"
|
|
|
|
assume_role_policy = <<ROLE_POLICY
|
|
{
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Sid": "",
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": "ecs-tasks.amazonaws.com"
|
|
},
|
|
"Action": "sts:AssumeRole"
|
|
}
|
|
]
|
|
}
|
|
ROLE_POLICY
|
|
}
|
|
|
|
resource "aws_iam_role_policy_attachment" "ecs_role-attach" {
|
|
role = aws_iam_role.ecs_role.name
|
|
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
|
|
}
|