Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow mixture of on-demand and spot instances (#140)
# Description Added the possibility of choosing the preferred balance to mix on-demand and Spot instances on the `on_spot` aws_autoscaling_group resource. As spot instances might be stopped without further notice, it might be useful to deploy at least one on-demand instance. Use the new variable `instances_distribution` to customize the minimum number of on_demand instances and the percentage of on_demand instances (excluding the on_demand base capacity). ```hcl module "bastion" { ... instances_distribution = { on_demand_base_capacity = 1 on_demand_percentage_above_base_capacity = 20 spot_allocation_strategy = "lowest-price" } } ``` # Verification - [x] simple example applied, still running - [x] mixture of 3:1 (spot:on-demand) instances (4 in total). Both instances are created and I am able to connect. # Checklist - [x] My code follows the style guidelines of the project - [x] I have performed a self-review of my own code - [x] I have made corresponding changes to the documentation --------- Co-authored-by: kayma <kayma@hlag.com> Co-authored-by: Matthias Kay <github-public@matthiaskay.de>
- Loading branch information