-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoScaling Warm Pool Hibernated State Support #23752
Comments
I'll happily pick this up and check it out, doing it together with #23735 |
Tested hibernation, seems to work as expected. resource "aws_launch_template" "example" {
name_prefix = "foobar"
image_id = "ami-0b28dfc7adc325ef4"
instance_type = "t2.micro"
block_device_mappings {
device_name = "/dev/sda1"
ebs {
volume_size = 20
encrypted = true
}
}
}
resource "aws_autoscaling_group" "default" {
availability_zones = data.aws_availability_zones.available.names
desired_capacity = 1
max_size = 3
min_size = 1
launch_template {
id = aws_launch_template.example.id
version = aws_launch_template.example.latest_version
}
warm_pool {
pool_state = "Hibernated"
min_size = 1
max_group_prepared_capacity = 10
}
} If there's anything I can help with please let me know @mab78611. Created a PR to update the docs. |
This functionality has been released in v4.7.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Current Terraform Version
1.1.7
AutoScaling
Use-cases
There was an announcement from AWS last month around AutoScaling Warm Pools and added support for "hibernating" during scale-in. The link to the announcement can be found below:
https://aws.amazon.com/about-aws/whats-new/2022/02/amazon-ec2-auto-scaling-warm-pools-supports-hibernating-returning-instances-warm-pools-scale-in/
We currently have a solution in place where
pool_state = "Stopped"
but would like Terraform to add in support for"Hibernated"
state.As of right now Terraform does not support the Hibernated state:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#pool_state
[pool_state](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#
pool_state) - (Optional) Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default) or Running.
Attempted Solutions
Current state:
warm_pool { pool_state = "Stopped" min_size = var.min_size max_group_prepared_capacity = var.min_size }
Attempted solution:
warm_pool { pool_state = "Hibernated" min_size = var.min_size max_group_prepared_capacity = var.min_size }
The text was updated successfully, but these errors were encountered: