Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to set enable_execute_command variable #22

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}