Skip to content

Commit

Permalink
fix: Change default deployment percentages when using EFS to allow up…
Browse files Browse the repository at this point in the history
…dates to succeed (#399)

fix: Change default deployment percentages when using EFA to allow updates to succeed
  • Loading branch information
bryantbiggs authored Mar 4, 2024
1 parent 1cd8db8 commit 834bc0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
rev: v1.88.0
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ locals {
sourceVolume = "efs"
readOnly = false
}] : try(var.atlantis.mount_points, [])

# Ref https://github.com/terraform-aws-modules/terraform-aws-atlantis/issues/383
deployment_maximum_percent = var.enable_efs ? 100 : 200
deployment_minimum_healthy_percent = var.enable_efs ? 0 : 66
}

module "ecs_cluster" {
Expand Down Expand Up @@ -229,8 +233,8 @@ module "ecs_service" {
capacity_provider_strategy = try(var.service.capacity_provider_strategy, {})
cluster_arn = var.create_cluster && var.create ? module.ecs_cluster.arn : var.cluster_arn
deployment_controller = try(var.service.deployment_controller, {})
deployment_maximum_percent = try(var.service.deployment_maximum_percent, 200)
deployment_minimum_healthy_percent = try(var.service.deployment_minimum_healthy_percent, 66)
deployment_maximum_percent = try(var.service.deployment_maximum_percent, local.deployment_maximum_percent)
deployment_minimum_healthy_percent = try(var.service.deployment_minimum_healthy_percent, local.deployment_minimum_healthy_percent)
desired_count = try(var.service.desired_count, 1)
enable_ecs_managed_tags = try(var.service.enable_ecs_managed_tags, true)
enable_execute_command = try(var.service.enable_execute_command, false)
Expand Down

0 comments on commit 834bc0d

Please sign in to comment.