Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,26 @@ module "atlantis" {
}
```

### Enable Deployment Circuit Breaker

You can enable the ECS deployment circuit breaker to automatically roll back failed deployments:

```hcl
module "atlantis" {
source = "terraform-aws-modules/atlantis/aws"

# ...

service = {
# Enable circuit breaker for automatic rollback on failed deployments
deployment_circuit_breaker = {
enable = true
rollback = true
}
}
}
```

## Examples

- [Complete Atlantis with GitHub webhook](https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/github-complete)
Expand Down
6 changes: 6 additions & 0 deletions examples/github-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ module "atlantis" {
tasks_iam_role_policies = {
AdministratorAccess = "arn:aws:iam::aws:policy/AdministratorAccess"
}

# Enable circuit breaker for automatic rollback on failed deployments
deployment_circuit_breaker = {
enable = true
rollback = true
}
}

# ALB
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ module "ecs_service" {
alarms = try(var.service.alarms, {})
capacity_provider_strategy = try(var.service.capacity_provider_strategy, {})
cluster_arn = var.create_cluster && var.create ? module.ecs_cluster.arn : var.cluster_arn
deployment_circuit_breaker = try(var.service.deployment_circuit_breaker, {})
deployment_controller = try(var.service.deployment_controller, {})
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)
Expand Down
Loading