diff --git a/main.tf b/main.tf index a94d28e..8d2f06a 100644 --- a/main.tf +++ b/main.tf @@ -39,7 +39,7 @@ module "aws_cw_logs" { #------------------------------------------------------------------------------ module "ecs_fargate" { source = "cn-terraform/ecs-fargate/aws" - version = "2.0.48" + version = "2.0.49" # source = "../terraform-aws-ecs-fargate" name_prefix = "${var.name_prefix}-sonar" @@ -57,6 +57,10 @@ module "ecs_fargate" { mount_points = var.mount_points permissions_boundary = var.permissions_boundary + # Deployment circuit breaker + deployment_circuit_breaker_enabled = var.deployment_circuit_breaker_enabled + deployment_circuit_breaker_rollback = var.deployment_circuit_breaker_rollback + # Application Load Balancer custom_lb_arn = var.custom_lb_arn lb_http_ports = var.lb_http_ports diff --git a/variables.tf b/variables.tf index 8768cbf..7e71507 100644 --- a/variables.tf +++ b/variables.tf @@ -270,6 +270,18 @@ variable "permissions_boundary" { default = null } +variable "deployment_circuit_breaker_enabled" { + description = "(Optional) You can enable the deployment circuit breaker to cause a service deployment to transition to a failed state if tasks are persistently failing to reach RUNNING state or are failing healthcheck." + type = bool + default = false +} + +variable "deployment_circuit_breaker_rollback" { + description = "(Optional) The optional rollback option causes Amazon ECS to roll back to the last completed deployment upon a deployment failure." + type = bool + default = false +} + #------------------------------------------------------------------------------ # Sonarqube SSL settings #------------------------------------------------------------------------------