Skip to content

Commit 593f463

Browse files
committed
feat: add ecs_service_enabled variable
- Introduced a new variable `ecs_service_enabled` to control the creation of the ECS service.
1 parent 24ff14c commit 593f463

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

modules/ecs-background/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ module "ecs_task" {
139139

140140
context = module.this.context
141141

142-
container_definition_json = "[${module.container.json_map_encoded}]"
142+
ecs_service_enabled = var.ecs_service_enabled
143+
container_definition_json = "[${module.container.json_map_encoded}]"
143144
ecs_cluster_arn = var.ecs_cluster_arn
144145
capacity_provider_strategies = var.ecs_capacity_provider_strategies
145146
launch_type = var.ecs_launch_type

modules/ecs-background/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ variable "ecr_image_tag_mutability" {
3939

4040
// ECS
4141

42+
variable "ecs_service_enabled" {
43+
type = bool
44+
description = "Whether or not to create the ECS service"
45+
default = true
46+
}
47+
4248

4349
variable "ecs_security_group_ids" {
4450
type = list(string)

0 commit comments

Comments
 (0)