Skip to content

Commit

Permalink
Add possibility to set enable_execute_command variable (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kossakowski authored Dec 6, 2022
1 parent b756b9c commit f51fcab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ resource "aws_ecs_service" "service_no_autoscaling" {
task_definition = aws_ecs_task_definition.task.arn
launch_type = "FARGATE"

enable_execute_command = var.enable_execute_command

network_configuration {
security_groups = [local.security_group_id]
subnets = var.subnet_ids
Expand Down Expand Up @@ -126,6 +128,8 @@ resource "aws_ecs_service" "service_autoscaling" {
task_definition = aws_ecs_task_definition.task.arn
launch_type = "FARGATE"

enable_execute_command = var.enable_execute_command

network_configuration {
security_groups = [local.security_group_id]
subnets = var.subnet_ids
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,10 @@ variable "ephemeral_storage_gib" {
description = "The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is 21 GiB and the maximum supported value is 200 GiB."
type = number
default = 21
}
}

variable "enable_execute_command" {
description = "Specifies whether to enable Amazon ECS Exec for the tasks within the service."
type = bool
default = false
}

0 comments on commit f51fcab

Please sign in to comment.