Skip to content

Commit

Permalink
fix: fail happy deploy if service does not start successfully (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hegeman authored Sep 26, 2023
1 parent 7157144 commit 7796ef7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .happy/terraform/modules/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ resource aws_ecs_service service {
subnets = var.subnets
assign_public_ip = false
}
deployment_circuit_breaker {
enable = true
rollback = !var.fail_fast
}

wait_for_steady_state = var.wait_for_steady_state
enable_execute_command = true
Expand Down
6 changes: 6 additions & 0 deletions .happy/terraform/modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,10 @@ variable "health_check_path" {
variable "frontend_url" {
type = string
description = "URL for the frontend app."
}

variable "fail_fast" {
type = bool
description = "Whether Terraform should fail if the desired service does not start. Opposite of rollback."
default = true
}

0 comments on commit 7796ef7

Please sign in to comment.