Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Commit

Permalink
Add some additional worker options (#7)
Browse files Browse the repository at this point in the history
* add support for suspending autoscaling processes

* resolves #6
  • Loading branch information
deanillfeld authored Mar 14, 2019
1 parent 48ae3e9 commit 4ac2beb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2019-03-15
### Added
- suspended_processes on worker groups
- enabled_metrics on worker groups

## [0.2.0] - 2019-03-01
- Added Velero Support
- Resolved issue with using aws_subnet_ids datasource for private_subnets
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ It is possible to customise individual parameters on the the workers list.
| desired\_capacity | ASG desired capacity. Ignored after creation | string | `"1"` | no |
| min\_size | ASG minimum size | string | `"1"` | no |
| max\_size | ASG maximum size | string | `"10"` | no |
| suspended\_processes | A comma seperated string of processes to suspend for the worker group | string | `""` | no |
| enabled\_metrics | A comma seperated string of ASG metrics to enable | string | `""` | no |
| on\_demand\_allocation\_strategy | Strategy to use when launching on-demand instances | string | `"prioritized"` | no |
| on\_demand\_base\_capacity | Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances | string | `"0"` | no |
| on\_demand\_percentage\_above\_base_capacity | Percentage split between on-demand and spot instances above the base on-demand capacity | string | `"0"` | no |
Expand Down
3 changes: 3 additions & 0 deletions workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ resource "aws_autoscaling_group" "workers" {
max_size = "${lookup(var.workers[count.index], "asg_max_size", 10)}"
vpc_zone_identifier = ["${var.private_subnets}"]

suspended_processes = ["${compact(split(",", lookup(var.workers[count.index], "suspended_processes", "")))}"]
enabled_metrics = ["${compact(split(",", lookup(var.workers[count.index], "enabled_metrics", "")))}"]

mixed_instances_policy {
instances_distribution {
on_demand_allocation_strategy = "${lookup(var.workers[count.index], "on_demand_allocation_strategy" , "prioritized")}"
Expand Down

0 comments on commit 4ac2beb

Please sign in to comment.