Skip to content

Commit 16162ff

Browse files
authored
feat: Add task_execution_session_duration for task execution role (#300)
1 parent 4a2a977 commit 16162ff

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ allow_github_webhooks = true
370370
| <a name="input_github_webhooks_ipv6_cidr_blocks"></a> [github\_webhooks\_ipv6\_cidr\_blocks](#input\_github\_webhooks\_ipv6\_cidr\_blocks) | List of IPv6 CIDR blocks used by GitHub webhooks | `list(string)` | <pre>[<br> "2a0a:a440::/29",<br> "2606:50c0::/32"<br>]</pre> | no |
371371
| <a name="input_internal"></a> [internal](#input\_internal) | Whether the load balancer is internal or external | `bool` | `false` | no |
372372
| <a name="input_manage_default_security_group"></a> [manage\_default\_security\_group](#input\_manage\_default\_security\_group) | Should be true to adopt and manage default security group | `bool` | `false` | no |
373+
| <a name="input_max_session_duration"></a> [max\_session\_duration](#input\_max\_session\_duration) | Maximum session duration (in seconds) for ecs task execution role. Default is 3600. | `number` | `null` | no |
373374
| <a name="input_mount_points"></a> [mount\_points](#input\_mount\_points) | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume`. The `readOnly` key is optional. | `list(any)` | `[]` | no |
374375
| <a name="input_name"></a> [name](#input\_name) | Name to use on all resources created (VPC, ALB, etc) | `string` | `"atlantis"` | no |
375376
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | If provided, all IAM roles will be created with this permissions boundary attached. | `string` | `null` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ data "aws_iam_policy_document" "ecs_tasks" {
530530
resource "aws_iam_role" "ecs_task_execution" {
531531
name = "${var.name}-ecs_task_execution"
532532
assume_role_policy = data.aws_iam_policy_document.ecs_tasks.json
533+
max_session_duration = var.max_session_duration
533534
permissions_boundary = var.permissions_boundary
534535

535536
tags = local.tags

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,3 +718,9 @@ variable "runtime_platform" {
718718
type = any
719719
default = null
720720
}
721+
722+
variable "max_session_duration" {
723+
description = "Maximum session duration (in seconds) for ecs task execution role. Default is 3600."
724+
type = number
725+
default = null
726+
}

0 commit comments

Comments
 (0)