File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ module "ecs_apps" {
101101| efs\_ lifecycle\_ transition\_ to\_ primary\_ storage\_ class | Option to enable EFS Lifecycle Transaction to Primary Storage Class | ` bool ` | ` false ` | no |
102102| enable\_ schedule | Enables schedule to shut down and start up instances outside business hours. | ` bool ` | ` false ` | no |
103103| extra\_ certificate\_ arns | Extra ACM certificates to add to ALB Listeners | ` list(string) ` | ` [] ` | no |
104+ | extra\_ task\_ policies\_ arn | Extra policies to add to the task definition permissions | ` list(string) ` | ` [] ` | no |
104105| fargate\_ only | Enable when cluster is only for fargate and does not require ASG/EC2/EFS infrastructure | ` bool ` | ` false ` | no |
105106| instance\_ types | Instance type for ECS workers | ` list(any) ` | ` [] ` | no |
106107| instance\_ volume\_ size | Volume size for docker volume (in GB). | ` number ` | ` 30 ` | no |
Original file line number Diff line number Diff line change @@ -354,4 +354,10 @@ variable "efs_lifecycle_transition_to_primary_storage_class" {
354354 type = bool
355355 default = false
356356 description = " Option to enable EFS Lifecycle Transaction to Primary Storage Class"
357+ }
358+
359+ variable "extra_task_policies_arn" {
360+ type = list (string )
361+ default = []
362+ description = " Extra policies to add to the task definition permissions"
357363}
Original file line number Diff line number Diff line change @@ -88,3 +88,9 @@ resource "aws_iam_role_policy" "s3_policy" {
8888}
8989EOF
9090}
91+
92+ resource "aws_iam_role_policy_attachment" "extra_task_policies_arn" {
93+ for_each = toset (try (var. extra_task_policies_arn , []))
94+ role = aws_iam_role. ecs_task . name
95+ policy_arn = each. key
96+ }
You can’t perform that action at this time.
0 commit comments