Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 2facd7a

Browse files
authored
Merge pull request #8 from HENNGE/capacity-rebalance
Add capacity rebalance flag support
2 parents d328306 + c5c9084 commit 2facd7a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ No requirements.
173173
| asg\_name | Creates a unique name for autoscaling group beginning with the specified prefix | `string` | `""` | no |
174174
| associate\_public\_ip\_address | Associate a public ip address with an instance in a VPC | `bool` | `false` | no |
175175
| block\_device\_mappings | Mappings of block devices, see https://www.terraform.io/docs/providers/aws/r/launch_template.html#block-devices | `list(any)` | <pre>[<br> {}<br>]</pre> | no |
176+
| capacity\_rebalance | Indicates whether capacity rebalance is enabled. | `bool` | `null` | no |
176177
| create\_asg | Whether to create autoscaling group | `bool` | `true` | no |
177178
| create\_asg\_with\_initial\_lifecycle\_hook | Create an ASG with initial lifecycle hook | `bool` | `false` | no |
178179
| create\_lt | Whether to create launch template | `bool` | `true` | no |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ resource "aws_autoscaling_group" "this" {
9595
protect_from_scale_in = var.protect_from_scale_in
9696
service_linked_role_arn = var.service_linked_role_arn
9797
max_instance_lifetime = var.max_instance_lifetime
98+
capacity_rebalance = var.capacity_rebalance
9899

99100
mixed_instances_policy {
100101
launch_template {
@@ -176,6 +177,7 @@ resource "aws_autoscaling_group" "this_with_initial_lifecycle_hook" {
176177
protect_from_scale_in = var.protect_from_scale_in
177178
service_linked_role_arn = var.service_linked_role_arn
178179
max_instance_lifetime = var.max_instance_lifetime
180+
capacity_rebalance = var.capacity_rebalance
179181

180182
mixed_instances_policy {
181183
launch_template {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,3 +326,9 @@ variable "max_instance_lifetime" {
326326
type = number
327327
default = null
328328
}
329+
330+
variable "capacity_rebalance" {
331+
description = "Indicates whether capacity rebalance is enabled."
332+
type = bool
333+
default = null
334+
}

0 commit comments

Comments
 (0)