Skip to content

Commit af564e9

Browse files
committed
Add ignore_task_fleet_capacity_drifts to task_instance_fleet
1 parent 0ddd4c6 commit af564e9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,13 @@ resource "aws_emr_instance_fleet" "this" {
406406
name = try(each.value.name, null)
407407
target_on_demand_capacity = try(each.value.target_on_demand_capacity, null)
408408
target_spot_capacity = try(each.value.target_spot_capacity, null)
409+
410+
lifecycle {
411+
ignore_changes = var.ignore_task_fleet_capacity_drifts ? [
412+
target_on_demand_capacity,
413+
target_spot_capacity
414+
] : []
415+
}
409416
}
410417

411418
################################################################################

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ variable "task_instance_group" {
209209
default = {}
210210
}
211211

212+
variable "ignore_task_fleet_capacity_drifts" {
213+
description = "Whether to ignore capacity drifts for task instance fleets. If set to `true`, the task instance fleet will not be resized if the capacity drifts from the desired configuration. Default value is `false`"
214+
type = bool
215+
default = false
216+
}
217+
212218
################################################################################
213219
# Managed Scaling Policy
214220
################################################################################

0 commit comments

Comments
 (0)