terraform deploy on ECS (#27)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
// 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"
|
||||
}
|
||||
Reference in New Issue
Block a user