Skip to content

Commit 190301b

Browse files
committed
enable tasks to use IAM role
1 parent 03c9279 commit 190301b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

task/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,20 @@ variable "log_driver" {
6767
default = "journald"
6868
}
6969

70+
variable "role" {
71+
description = "The IAM Role to assign to the Container"
72+
default = ""
73+
}
74+
7075
/**
7176
* Resources.
7277
*/
7378

7479
# The ECS task definition.
7580

7681
resource "aws_ecs_task_definition" "main" {
77-
family = "${var.name}"
82+
family = "${var.name}"
83+
task_role_arn = "${var.role}"
7884

7985
lifecycle {
8086
ignore_changes = ["image"]

0 commit comments

Comments
 (0)