Skip to content

Commit

Permalink
fix cal
Browse files Browse the repository at this point in the history
  • Loading branch information
marciogoda committed May 3, 2024
1 parent 6ecb41c commit 263f8e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "ecs_update_monitor" {
locals {
p = var.spot_capacity_percentage <= 50 ? var.spot_capacity_percentage : 100 - var.spot_capacity_percentage
lower_weight = ceil(local.p / 100)
higher_weight = local.lower_weight == 0 ? 1 : (floor(local.lower_weight / (local.p / 100)) - 1)
higher_weight = local.lower_weight == 0 ? 1 : (floor(local.lower_weight / (local.p / 100)) - local.lower_weight)
spot_weight = var.spot_capacity_percentage <= 50 ? local.lower_weight : local.higher_weight
ondemand_weight = var.spot_capacity_percentage <= 50 ? local.higher_weight : local.lower_weight

Expand Down

0 comments on commit 263f8e3

Please sign in to comment.